Saving an image from a group snapshot to a file

Moderators: LCNeil, heatherlaine, kevinmiller, elanorb

Post Reply
newtronsols
Posts: 192
Joined: Tue Mar 11, 2014 12:57 pm

Saving an image from a group snapshot to a file

Post by newtronsols » Wed Apr 09, 2014 8:17 am

I am trying to save an image to a file e.g.

export snapshot from group "Caption" to image "image" as GIF [this is combining a text field and an image and appears OK on screen]
put image "image" into URL ("file:pic.gif")

But does not read from the file in Windows.
I've tried png, jpg but the file cannot be be read via Windows 7. The gif opens but also appears incorrectly.
pic.gif

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: Saving an image from a group snapshot to a file

Post by LCNeil » Wed Apr 09, 2014 10:27 am

Hi newtronsols,

When writing an image to file you should use "binfile" and not "file". File is primarily used when working with text files.

Code: Select all

put image "image" into URL ("binfile:pic.gif")
The following is taken from the URL entry o the LiveCode dictionary-
file: a text file on the local disk (not on a server)
binfile: a binary file
Kind Regards,


Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
——

Post Reply

Return to “idea2app and Coding School”