添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
){outline:none;box-shadow:none;}select::-ms-expand{;}:root,:host{--chakra-vh:100vh;}@supports (height: -webkit-fill-available){:root,:host{--chakra-vh:-webkit-fill-available;}}@supports (height: -moz-fill-available){:root,:host{--chakra-vh:-moz-fill-available;}}@supports (height: 100dvh){:root,:host{--chakra-vh:100dvh;}}
Link to home
Start Free Trial Log in
Avatar of Dennis_Treacy

Delphi - Error when loading 96dpi jpeg file into Image.Picture

I can load a 72dpi jpeg file into TImage using
Image.Picture.LoadFromFile (FileName) ;
but not a 96dpi jpeg file.
If I change the code to the following, I get the same result
jpeg:= TJpegImage.Create;
jpeg.LoadFromFile(filename );
Image.Picture.Graphic := jpeg;
What changes do I need to make for 96 dpi images?
I use Delphi XE. Thanks
or attach the jpeg so we can do some troubleshooting
I have attached one of the offending jpeg files. An exception error, JPEG Error #53, occurs at
jpeg.LoadFromFile(filename );
Google search indicates #53 may be a memory issue - not much help really.
I can't see any attached file here.
Anyway #53 usually means that the jpeg file is corrupted. Have you downloaded it from internet? If so it could be not 100% downloaded, so there's not a correct file end that generates the out of memory error on reading it.
Someone tells that he solved this issue using TADVPicture from TMS Software (I don't have it installed, so I don't know if it's true).
Try reopening the file in Photoshop or some other Image tool and re-save it, Or if you have downloaded it just try downloading it again.
The file was emailed to me by a client (student photos from a school). I can load them into Excel so I don't believe they are corrupted. Once I submit this comment I will try attaching again. Having some trouble doing that - getting a request for file description?
File attached