ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Out of memory error with IO.LoadFromFile on jpeg
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

wvisser

Netherlands
8 Posts

Posted - Mar 03 2016 :  05:13:35  Show Profile  Reply
Hello,

I get an Out or memory error when loading attached P2010026.jpg file. I also can reproduce it in the ..\ImageEnDemos\ImageEditing\Resise demo project.

I do not have the problem with very similar jpeg files (such as the also attached P2010022.jpg file), also not from the same camera, so I can accept the fact that this particular image file may be corrupt. However, I have no problem opening/viewing it in explorer and other image viewers.

I am using ImageEn version 5.10, Windows 10, Delphi XE5 SP2 for development.
The problem is also when running the app on other Windows versions with this file.

4 small questions:
1) is the P2010026.jpg file corrupt?
2) is this a bug in version 5.10 that later has been fixed?
3) how to gently copy with corrupt jpeg files (abort loading)?
4) is there a way to repair a corrupt jpeg file?

regards, Thanks
Wilfried





wpjvisser

xequte

39053 Posts

Posted - Mar 03 2016 :  13:34:39  Show Profile  Reply
Hi Wilfried

I can't reproduce any error loading these images in v6.2.2, and I don't have a 5.1.0 exe handy for comparison. So I assume that version does not cope as well with corruption (or some other issue).

You can confirm this by trying one of the EXEs on the demo page.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

w2m

USA
1990 Posts

Posted - Mar 03 2016 :  14:11:01  Show Profile  Reply
You may exit loading and abort by inspecting the result of the ImageEnView1.IO.Aborting boolean value:
ImageEnView1.IO.LoadFromFile(iFileName);
if ImageEnView1.IO.Aborting then
  begin
    MessageDlg('The image can not be opened.', mtError, [mbOK], 0);
  end;

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: