Go Premium for a chance to win a PS4. Enter to Win

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

JPEG Error in Delphi 6

i have a jpeg image which can be viewed in Internet Explorer 6....but, when i load it from Delphi 6 via JPEG unit ...it tell me the error of "JPEG error #52"

 Jpeg:=TJpegimage.Create;
  try
    Jpeg.LoadFromFile(edimagefile.text);
  finally
    Jpeg.Free;
  end;

is there anyway i can fix it ?

thanks
0
chongkeng_woon
Asked:
chongkeng_woon
  • 2
1 Solution
 
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
the jpeg error #52 says that it is not a jpeg file (bad file format)...
are you sure about the format of the image?
0
 
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
BTW just in addition take a look here
http://community.borland.com/article/0,1410,20433,00.html
there's code for jpeg errors translation
error #52 = Not a JPEG file: starts with 0x%02x 0x%02x
Check for the format of your image....it seems that it's saved with jpg extension but the header isn't correct
0
 
Wim ten BrinkCommented:
It could be a JPEG2000 image. There are new formats of the JPEG file format, including one that supports lossless compression. The JPEG unit is just a bit outdated...
0

Featured Post

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.

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