Detect corrupt JPG-s
From: Raigo (nospam_at_no_spam.com)
Date: 12/31/03
- Next message: Ed Dressel: "Re: VB to Delphi"
- Previous message: Ignacio Vazquez: "Re: VB to Delphi"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Next message: Ed Dressel: "Re: VB to Delphi"
- Previous message: Ignacio Vazquez: "Re: VB to Delphi"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|