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
 ImageEnDBView and TIFF Files
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

giuseppe

Italy
4 Posts

Posted - Sep 19 2012 :  07:46:47  Show Profile  Reply
I have a TImageENDBView Control with a tiff image loaded.
I need to load a TImageENMView Control from the previus control in order to diplay multiple image!!

Any helps?

Thank you

w2m

USA
1990 Posts

Posted - Sep 19 2012 :  08:14:11  Show Profile  Reply
I rarely use ImageEnDBView so this is untested. But if you have a database field with the path to the image you can just use ImageEnMView1.MIO.LoadFromFile('c:\images\test.tif');

You could also look at TImageEnDBView.AbsolutePath in the help file.

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

giuseppe

Italy
4 Posts

Posted - Sep 19 2012 :  08:22:04  Show Profile  Reply
Sorry, i have a blob field with the image inside!!
Go to Top of Page

w2m

USA
1990 Posts

Posted - Sep 19 2012 :  09:16:24  Show Profile  Reply
Look at the DBMView example in ...\samples\database...

You could also look to see if the ImageEnDBView.IO.Params.Filename is filled with the path to the image as well.

Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html

William Miller
Go to Top of Page

giuseppe

Italy
4 Posts

Posted - Sep 20 2012 :  02:34:36  Show Profile  Reply
Thank you for your reply!!
I finally changed the DBView control with a ImageenView, saving the blob field into a file and then loading the file!

I have a problem with the ImageEnIO when i save a tiff file!!

It saves just the first page of the multipages file!!

The control is connected to the ImageenView by the attachedimageen property!!

Code:

ImageEnIO1.SaveToFile('c:\pp.tif',ioTIFF);

Thank You
Go to Top of Page

w2m

USA
1990 Posts

Posted - Sep 20 2012 :  05:59:59  Show Profile  Reply
If you have the multiframe tif in an ImageEnMView then just call
ImageEnMView1.MIO.SaveToFileTIFF(SavePictureDialog1.FileName);

This will save all the frames in the ImageEnMView.

If you have only one frame of a tif file in a database blob there is no way to save all the frames that I know of. ImageEn must be able to read all of the frames in order to save to a multiframe tif. That is why ImageEnMView is one of the simple ways to save multiframe files.

I have little experience trying to deal with multiframe files with ImageEnDBView so my experience is limited here. I suppose you could store each frame in a seperate blob, but this seems a messy way to do it.

If you just store the path to the file in your database you have a number of ways to load, view and save the frames by using in-memory storage of the frames or by placing an ImageEnView on a pagecontrol tabsheet, then loading each frame of the tif file on a ImageEnView tabsheet.

There are demonstration projects written with Delphi 2010 in my EBook that shows how to load, display and save multiframe tif files to TIEImageList as well as on a pagecontrol.

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

giuseppe

Italy
4 Posts

Posted - Sep 20 2012 :  23:48:15  Show Profile  Reply
Thank You!!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: