Solved

JPEG Error in Delphi 6

Posted on 2004-09-17
3
1,449 Views
Last Modified: 2008-03-10
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
Comment
Question by:chongkeng_woon
  • 2
3 Comments
 
LVL 22

Expert Comment

by:Ferruccio Accalai
ID: 12083826
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
 
LVL 22

Expert Comment

by:Ferruccio Accalai
ID: 12083881
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
 
LVL 17

Accepted Solution

by:
Wim ten Brink earned 250 total points
ID: 12084687
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question