Solved

JPEG Error in Delphi 6

Posted on 2004-09-17
3
1,440 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

706 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now