I am trying to save an image for example image "a" to the specialfoldpath ("Documents") of iOS. It seems to save, but the file saved is corrupt. When I open the file in Preview, it says,
"The file "9372.png" could not be opened.
It may be damaged or use a file format that Preview doesn't recognize."
This is what I have,
set the defaultFolder to specialFolderPath("Documents")
put image "a" into url ("binfile:9371.png")
or
put the imagedata of image "a" into tPic
put tPic into url ("binfile:9371.png")
any suggestions please!!
Scott
Saving images in iOS - results corrupt
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Saving images in iOS - results corrupt
Hi Scott,
Try this
Kind regards
Jean-Marc
Try this
Code: Select all
get the text of img "9372.png"
put specialfolderPath("documents") & "/" & "9372.png" into tPath
put it into url("binfile:" & tpath)
Jean-Marc
https://alternatic.ch
Re: Saving images in iOS - results corrupt
Hi Scott,
or use "export", which has always worked for me:
...
put specialfolderPath("documents") & "/9372.png" into tPath
export img "a" to file tPath as PNG
...
Best
Klaus
or use "export", which has always worked for me:
...
put specialfolderPath("documents") & "/9372.png" into tPath
export img "a" to file tPath as PNG
...
Best
Klaus