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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Out of memory error with IO.LoadFromFile on jpeg

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
wvisser Posted - Mar 03 2016 : 05:13:35
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
2   L A T E S T    R E P L I E S    (Newest First)
w2m Posted - Mar 03 2016 : 14:11:01
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
xequte Posted - Mar 03 2016 : 13:34:39
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