Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1765
  • Last Modified:

What is JPEG error #52


Does anyone have a list of these jpeg error numbers?  What is this? (Attempting to read and save jpegs).
0
jexd99
Asked:
jexd99
  • 3
  • 2
1 Solution
 
jexd99Author Commented:
D3 / Win98
0
 
kretzschmarCommented:
hi jexd99,

from borland

--- paste begin
Interpreting Cryptic Jpeg Error Number's
By Corbin Dunn

If you have used the TJpegImage class you may be familiar with the "JPEG error #xx" error that comes up on occasion. You may want to know exactly what went wrong, and how to get more information based on that number.

Luckily, the TJpegImage pascal source is included on the Delphi CD. Looking at the source, you will notice that it is a wrapper around some C code. There is one particular file called "jerror.h" which contains an enumeration of error strings. Based on the offset in this enum, you can find out what a given error number means.

For ease of use, I converted the "jerror.h" file to pascal in the unit JpegErrors.pas. To use this unit, simply reference the string array cJpegErrors, passing a given error number to find the error string, such as:

      Label1.Caption := cJpegErrors[StrToInt(Edit1.Text)]
Note that the JpegErrors.pas unit was based on the Jpeg source that comes with Delphi 5. If the order of the error messages in "jerror.h" ever changes, the JpegErrors.pas will not by in sync with it and has to be updated.
--- paste end

get the jpeg_error.pas file and sample:

http://community.borland.com/article/images/20433/jpeg_errors.zip

hope this helps

meikl
0
 
kretzschmarCommented:
specially #52

cstrJERR_NO_SOI = 'Not a JPEG file: starts with 0x%02x 0x%02x';
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
bryan7Commented:
listenning
0
 
jexd99Author Commented:
Go ahead and answer this and I'll grade you.

   
0
 
jexd99Author Commented:
Ignore that last message I left :)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now