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
 D7, ImageEn v6.0.1, JPEG won't load.
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

fourwhey

20 Posts

Posted - Jul 13 2016 :  12:16:07  Show Profile  Reply
I have a few jpeg files won't load into an ImageEnView.
I'm using OpenImageEnDialog to browse to the files (the preview works) and open one. I set ImageEnView1.IO.LoadFromFile and nothing happens. Other jpeg files open fine and I can open the problem files elsewhere.

Any help would be appreciated.


ImageEnView1.Blank;
ImageEnView1.IO.Params.JPEG_Scale := ioJPEG_AUTOCALC;

if (OpenImageEnDialog1.Execute) then
  ImageEnView1.IO.LoadFromFile(OpenImageEnDialog1.FileName);


See the below link to download the jpeg files from OneDrive.

https://1drv.ms/u/s!AsNfPwVDI-xGqt4yjizrtjixQ_jl3w

w2m

USA
1990 Posts

Posted - Jul 13 2016 :  12:40:27  Show Profile  Reply
I can open your jpg files here with no problem at all. The problem is not ImageEnView1.IO.LoadFromFile. Perhaps the problem is an event in your code or possibly in code you have not shown. It is not necessary to call ImageEnView1.Blank;

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

fourwhey

20 Posts

Posted - Jul 13 2016 :  13:37:53  Show Profile  Reply
Thank you for looking.

This was on a blank project with one form. I added the ImageEnView1.Blank since I was trying to test why it wouldn't open.

Here's a video capture of what it's doing.

https://1drv.ms/v/s!AsNfPwVDI-xGqt4zc2TKi5S8IPPIew

Also, here's a zip of the project.

https://1drv.ms/u/s!AsNfPwVDI-xGqt406Q7zldg2km-INQ

Any ideas?
Go to Top of Page

w2m

USA
1990 Posts

Posted - Jul 13 2016 :  13:51:04  Show Profile  Reply
Your exe does not open the image, but when I compile your project here, the image is loaded correctly. I have no idea why you are having difficulty. Try this:

procedure TForm1.btn1Click(Sender: TObject);
begin
  if (OpenImageEnDialog1.Execute) then
  begin
    if FileExists(OpenImageEnDialog1.FileName) then
    begin
      ImageEnView1.IO.LoadFromFile(OpenImageEnDialog1.FileName);
      ImageEnView1.Update; { This ususally is not required, but in your case it might} 
      if ImageEnView1.IO.Aborting then
      begin
        MessageBox(0,
          'There was an error opening the image.  The image can not be opened.',
          'Error', MB_ICONWARNING or MB_OK);
        Exit;
      end;
    end
    else
      MessageBox(0, 'The image can not be opened.  The file does not exist.',
        'Error', MB_ICONWARNING or MB_OK);
  end;
end;

Do you get an error message when you compile and run this?
Do any of the demo's do the same thing?

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

fourwhey

20 Posts

Posted - Jul 13 2016 :  14:26:31  Show Profile  Reply
It shows the dialog, "There was an error opening the image. The image can not be opened."

I'm able to open the files that were an issue using the "ImageEn Actions Example" precompiled sample. I'm not able to compile the sample though, because it appears to be built using a newer version of the control. It is using iexBitmaps, which isn't in the source for v6.0.1.
Go to Top of Page

w2m

USA
1990 Posts

Posted - Jul 13 2016 :  14:30:19  Show Profile  Reply
I suggest you obtain the latest version and reinstall. I do not know anything else you can do, other than removing ImageEn and reinstall your current version. Having said that, I never had any problem trying to do something as simple as this with any version of ImageEn since version 1.x.

Have you tried the demos?

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

fourwhey

20 Posts

Posted - Jul 13 2016 :  14:39:56  Show Profile  Reply
 
I suggest you obtain the latest version and reinstall. I do not know anything else you can do, other than removing ImageEn and reinstall your current version. Having said that, I never had any problem trying to do something as simple as this with any version of ImageEn since version 1.x.

Have you tried the demos?


I re-upped my license, hopefully it will work. Yes, I've been using ImageEn for a number of years and it's the first time I've encountered an issue like this. I have compiled the demos previously but not in some time.

Thanks for your help. I'll let you know if reinstalling the new version fixes things.

Cheers.
Go to Top of Page

fourwhey

20 Posts

Posted - Jul 13 2016 :  21:05:05  Show Profile  Reply
Removing the older version and installing the update seems to have worked. Thanks.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: