Link to home
Start Free TrialLog in
Avatar of chongkeng_woon
chongkeng_woon

asked on

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
Avatar of Ferruccio Accalai
Ferruccio Accalai
Flag of Italy image

the jpeg error #52 says that it is not a jpeg file (bad file format)...
are you sure about the format of the image?
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
ASKER CERTIFIED SOLUTION
Avatar of Wim ten Brink
Wim ten Brink
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial