Having fun with livecode however I have a question and a clarification that I've not seen answered elsewhere.
When I 'dump' an image copied on the clipboard (from an external program, say a web browser) I have found
out that regardless of the format (gif, jpg etc) of the original image, the output is always in PNG format.
Is that the expected behaviour? See example code below
Code: Select all
--example code
--I put the contents of an image on the clipbaord to currentclipdata var
put clipBoardData["image"] into currentclipdata["contents"]
--then dump the contents of the clipboard on my desktop as clipImage.jpg
--and open it with an image editor
put specialFolderPath("Desktop") into tmpPath
set the defaultFolder to tmpPath
put currentclipdata["contents"] into URL ("binfile:" & tmpPath & "/clipImage.jpg")
launch document tmpPath & "/clipImage.jpg"
--voila I find my image editor complain that 'clipImage' has the WRONG extension
--that the image should actually be 'clipImage.png' even if the original image was jpg format
necessarily having access to it's filename (extension). I am asking this also because I know it's possible to
have a mis-named image file. For example a user could have an image file mis-named as 'myImage.png'
that is actually in JPG format. I know how to determine the format from filename extension, but what
happens if that is unreliable.
Helpers appreciated in advance.

David Ok