Another one for the Utility behavior! :-)

Bob S


> On Feb 17, 2020, at 13:57 , Phil Davis via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> function isSupportedImage pPath
>     # Allow JPG, PNG and GIF images.
> 
>     put byte 1 to 12 of url ("binfile:" & pPath) into tHeader
>     switch
>         case "JFIF" is in tHeader
>         case "PNG" is in tHeader
>         case "GIF" is in tHeader
>             return true
>             break
>         default
>             return false
>             break
>     end switch
> end isSupportedImage


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to