Re: Invalid Image File / Original Image Size

2020-02-18 Thread Bob Sneidar via use-livecode
Another one for the Utility behavior! :-) Bob S > On Feb 17, 2020, at 13:57 , Phil Davis via use-livecode > wrote: > > function isSupportedImage pPath > # Allow JPG, PNG and GIF images. > > put byte 1 to 12 of url ("binfile:" & pPath) into tHeader > switch > case "JFIF" i

Re: Invalid Image File / Original Image Size

2020-02-17 Thread Phil Davis via use-livecode
Hi Ralph, Certainly Klaus's approach will work. Here is another that works. As you know, image files have "signatures" in their headers to identify what kind of files they are: https://en.wikipedia.org/wiki/List_of_file_signatures (the "ISO 8859-1" column) Once you know the signatures

Re: Invalid Image File / Original Image Size

2020-02-17 Thread Klaus major-k via use-livecode
Hi Ralph, > Am 17.02.2020 um 22:08 schrieb Ralph DiMola via use-livecode > : > > What's the best way to know if I set the filename of an image control and > the file is either not an image or in an unsupported format? I'm getting > https links to unknown images so I check images before app deplo

Invalid Image File / Original Image Size

2020-02-17 Thread Ralph DiMola via use-livecode
What's the best way to know if I set the filename of an image control and the file is either not an image or in an unsupported format? I'm getting https links to unknown images so I check images before app deployment. After resizing an image is there a way to know the original dimensions? Just won