Detect corrupt JPG-s

From: Raigo (nospam_at_no_spam.com)
Date: 12/31/03


Date: Wed, 31 Dec 2003 19:04:45 +0200

How to detect or check that a JPG is corrupt?
I have JPG images in Interbase BLOB. When they are read from there with
some of them I get "JPEG error #52". I searched google and found, this
means there is something wrong with the JPG image or it is not at all a
JPG (user has entered something else, with just jpg extension).

some other JPEG-Errorcodes:
#36 : m:=m+'Output file write error --- out of disk space?';
#51 = JERR_NO_QUANT_TABLE: Quantization table 0x%02x was not defined
#52 : File is not a JPEG-File (for example if you try to read a GIF as a
JPG)
#53 = JERR_OUT_OF_MEMORY: Insufficient memory (case %d)
#60 : JPEG file is incomplete
#67 : JPEG file is incomplete (like #60 - don't know where the difference).

My question: how can I check in code if JPG is OK or corrupt?

I am using Delphi 6.



Relevant Pages

  • Re: What next?
    ... of the porn spammer to utter "The Augury is good, ... Is it just me or is the jpg corrupt? ... I saved the bmp as a jpg using ACDSee & it did something funny. ... tried std Windows Paint same prob. ...
    (comp.sys.ibm.pc.games.action)
  • Re: What next?
    ... The 1st was when I fired up the game in ... Is it just me or is the jpg corrupt? ... I saved the bmp as a jpg using ACDSee & it did something funny. ...
    (comp.sys.ibm.pc.games.action)
  • Re: Detect corrupt JPG-s
    ... > How to detect or check that a JPG is corrupt? ... > I have JPG images in Interbase BLOB. ... how can I check in code if JPG is OK or corrupt? ... jpegs, but this routine would be nearly as complex as reading the jpeg, and ...
    (borland.public.delphi.language.objectpascal)
  • Re: Publisher is printing jpg as black box
    ... okay, then it could be this image is corrupt. ... Open it in Paint, save as a different name and try again. ... >I have inserted a jpg into my document and it appears correctly on the screen ...
    (microsoft.public.publisher)
  • Re: What next?
    ... Is it just me or is the jpg corrupt? ... I saved the bmp as a jpg using ACDSee & it did something funny. ... tried std Windows Paint same prob. ...
    (comp.sys.ibm.pc.games.action)