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
 How To Display Image directly using ImageEnView co
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

martin

Philippines
10 Posts

Posted - Apr 07 2014 :  21:44:57  Show Profile  Reply
How To Display Image directly using ImageEnView component from a TRzFileListBox

I tried using this code but couldn't display the image

ImageEnView1.IO.LoadFromFileJpeg(RzFileListBox1.Items.Strings[i]);

note: *LoadFromFileJpeg just using this because I am selecting jpeg files

thanks

Rizal Martin

Uwe

284 Posts

Posted - Apr 07 2014 :  21:55:54  Show Profile  Reply
Martin

My guess: you need to provide a path to your file.

-Uwe
Go to Top of Page

martin

Philippines
10 Posts

Posted - Apr 08 2014 :  01:10:51  Show Profile  Reply
I'm using TRzFileListBox component which is directly connected to the RzDirectory Tree.

I also tried this ExtractFileName(RzFileListBox1.Items.Strings[i])
but still didn't work

Rizal Martin
Go to Top of Page

w2m

USA
1990 Posts

Posted - Apr 08 2014 :  06:07:41  Show Profile  Reply
Try this
var
iFilename: string;

begin
  iFilename := RzFileListBox1.Items.Strings[i];
  if not FileExists(iFilename) then
    ShowMessage('The file ' + iFilename + ' does not exist.')
  else
  begin
    ShowMessage('The file ' + iFilename + ' exists.  Select Ok to load the file.');
    ImageEnView1.IO.LoadFromFileAuto(iFilename);
    if ImageEnView1.IO.Aborting = True then
    begin
      ShowMessage('ImageEn can not open the picture.  The picture may be defective.');
    end;
end;

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Custom ImageEn Development
Go to Top of Page

martin

Philippines
10 Posts

Posted - Apr 09 2014 :  00:01:19  Show Profile  Reply
Thanks w2m.. it worked! good job!

another question have you tried displaying PDF files into the ImageEnMView component or what component should I use?

thanks

Rizal Martin
Go to Top of Page

xequte

38608 Posts

Posted - Apr 09 2014 :  03:22:20  Show Profile  Reply
Hi Rizal

You need to install ImageMagick and GhostScript to view PDF files in ImageEnMView:

http://www.imageen.com/ieforum/topic.asp?TOPIC_ID=1464

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

martin

Philippines
10 Posts

Posted - Apr 09 2014 :  05:13:21  Show Profile  Reply
thanks Nigel

I'll try to read this and apply it..
Is there other way aside using the imagemagick?


Thanks

Rizal Martin
Go to Top of Page

Uwe

284 Posts

Posted - Apr 09 2014 :  07:40:17  Show Profile  Reply
Martin,

of course there is an alternative: use a simple TWebBrowser to load the PDF.

-Uwe
Go to Top of Page

xequte

38608 Posts

Posted - Apr 10 2014 :  03:11:39  Show Profile  Reply
Hi Uwe

Yes, this is true, but you need to ensure that Acrobat has been installed on the client.

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

Uwe

284 Posts

Posted - Apr 10 2014 :  07:30:33  Show Profile  Reply
You're right, Nigel - I forgot to mention that the Acrobat Reader has to be installed on the target system. Although that shouldn't be an issue since most users have the software installed anyway these days. An error check is of course necessary.

-Uwe
Go to Top of Page

xequte

38608 Posts

Posted - Apr 10 2014 :  14:12:39  Show Profile  Reply
Hi Uwe

Yes, it is rarely a problem. I used this technique to display PDF files in an application in my pre-ImageEn days, and it worked well.

In this case however, he is looking to display thumbnails, which means a third party library such as Ghostscript.

There is also another way, but it would require some work and a paid license from a third party. Email me, Rizal, if you want more info.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: