How to check for corrupt jpgs

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
scott47303
Posts: 17
Joined: Tue Aug 10, 2010 3:16 pm

How to check for corrupt jpgs

Post by scott47303 » Wed Mar 14, 2012 4:22 pm

Say i have a directory of jpeg files, how would i go about to make sure they are valid. I am completely lost when it comes to this.

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: How to check for corrupt jpgs

Post by Klaus » Wed Mar 14, 2012 4:41 pm

Hi Scott,

you could set the filename of an image to any jpeg and check "the result" immediately after that.
But I am not sure if LiveCode will complain at all when doing so...

I would use a player object, set its filename and let QuickTime report an error if any, I am sure that will work.

Maybe you could check the file directly, but I have no idea about this binary stuff :-)


Best

Klaus

Post Reply