Vijay Shankar wrote:
> Hi,
> 
> I need a JPEG image validator.
> 
> I have a JPEG encoder which encodes the data that we get from image sensor.
> I will add some exif header and a thumbnail data to that data before I save
> it to file. But the decoder that I have in my hardware says the JPEG data is
> corrupted. It fails open the JPEG file. Interestingly I am able to open that
> file in desktop and view the photo. I can also see the exif info in the
> properties.
> I want to make sure that the data that I save to the file is in proper
> format. Hence I need a JPEG file validator which can tell me if there is any
> problem with the exif data that I add or with the encoded JPEG data that I
> get from the encoder.
> 
> If any of you have some idea about it, please let me know.
> 
> Regards,
> Vijay

JPEG is a very complex format and not every decoder implementation is 
complete.  This is especially true if you start messing with some of the 
extensions of the format or proprietary, patented extensions like JBIG.

So to keep the requirements for a hardware decoder down to some 
reasonable level, the makers of the hardware may choose to eliminate 
some of the less commonly used stuff.  This has the downside of causing 
some JPEGs to fail to be loaded/viewed.

I, once upon a time, started writing a JPEG decoder and, whenever I do 
stuff like that, I tend to write a small utility program that breaks 
down each portion of a file into a sort of dump of information about the 
file.  My utility for JPEG didn't really get very far - I realized I had 
bitten off way more than I could chew.

Anywho.  A quick Google search turned up a GUI analyzer for JPEG images:

http://www.impulseadventure.com/photo/jpeg-snoop.html

I have no idea if the program works for your purpose but it should be 
able to take apart the JPEGs you are making to try to figure out the 
source of the problem.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.0
Get on task.  Stay on task.

http://www.CubicleSoft.com/MyTaskFocus/

Reply via email to