Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem with showing some JPG files in Delphi

Tags:

jpeg

delphi

i have tried to open some JPEG files in Delphi with TImage component. i also added the Jpeg unit. i can open most of jpg files and there is no problem.

but when i try to open some JPGs, the program just throw an exception.

i also tried to load that images in design mode, but there is some problem. in design mode the exception is:

Access violation at address 402672A1 in module 'vcljpeg70.bpl'. Write of address 08E84000

Why i cannot open that JPGs? they are not corrupted. i checked them in some tools like savantools EXIF viewer.

here is the URL of one of that images: http://xs842.xs.to/xs842/09340/backpic435.jpg

Thanks so much

PS: My Delphi version is 7. Borland Delphi 7

like image 301
Isaac Avatar asked Aug 23 '09 17:08

Isaac


People also ask

Why can't I view my JPG files?

Update the Microsoft Photos App On a Windows computer, Microsoft Photos is the default app for opening JPG files. If the app is outdated or corrupt, it will lead to any sorts of issues, and the inability to open JPG files could be one of them. Updating Windows Photos should fix any bugs, errors, or technical glitches.

Why can't I open JPG files on my Android phone?

You cannot open unsupported images on an Android device. So the best way is to convert the picture file type to a format supported by your mobile make and model. In case, despite having a supported image file type, the picture doesn?t open in Android, try rebooting your phone or compress the image size.


1 Answers

The reason you may be encountering this problem is due to the file type. Delphi has issues displaying JPEG images that have been encoded using CMYK, rather than the default RGB encoding. CMYK is a format that is generally used for Print design, try and always encode your images to RGB format to avoid this issue with Delphi.

Patch for Delphi jpeg.dcu

Bye.

like image 126
RRUZ Avatar answered Oct 14 '22 23:10

RRUZ