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
 TImageEnView always show the last open image
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

adisonx

Thailand
29 Posts

Posted - Dec 10 2014 :  22:43:04  Show Profile  Reply
My program is when user is open image from dialog box,I want to store image to vector so every images can navigate using left key and right key.But TImageEnView always show the last image that open no matter I try to attach any image from vector.Here is my codes
....
if(this->OpenImageEnDialog->Execute())
{
ImageEnView->IO->LoadFromFile(OpenImageEnDialog->FileName);
TIEBitmap* image = new TIEBitmap(ImageEnView->IO->IEBitmap); //clone image
imageVect.push_back(image); //add new image to vector
this->AddPage();//increase total page number

}
...

//Now at navigate part
...

void TMainForm::AttachImage(int pageNo)
{

TIEBitmap* image = imageVect.at(pageNo-1);//get image pointer from vector
this->ImageEnView->IO->AttachedIEBitmap = image; //attach image to IO
this->ImageEnView->IO->Update();//update


}


Thank you.

xequte

39140 Posts

Posted - Dec 11 2014 :  14:45:41  Show Profile  Reply
Hi

I'm not sure you are doing this the best way. Why not use a TImageEnMView object? It can efficiently store many images and you can set DisplayMode to sdSingle to shown only one image:

http://www.imageen.com/help/TImageEnMView.DisplayMode.html

Or output assign the current bitmap to a TImageEnMView.

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

adisonx

Thailand
29 Posts

Posted - Dec 12 2014 :  03:32:08  Show Profile  Reply
It 's true that when I set display mode to mdSingle and it 's show single image,but at show at thumbnail size.All I want to do is show image like the way of TImageEnView.
My images are scanned images and one document can has many pages and user can
view each page by navigation(like PDF reader) and do some works like zoom in or zoom out and modify image. If TImageEnMView is the solution so please give me some sample of setting.




Thank you.
Go to Top of Page

adisonx

Thailand
29 Posts

Posted - Dec 12 2014 :  04:02:19  Show Profile  Reply
Now I changed my code to
....
//when user add image
ImageEnView->IO->LoadFromFile(OpenImageEnDialog->FileName);
TIEBitmap* image = new TIEBitmap(ImageEnView->IO->IEBitmap); //clone image
ImageEnMView->AppendImage(image);
this->AddPage();//increase total page number
....
...
//when user navigate throught page
void TMainForm::AttachImage(int pageNo)
{

TIEBitmap* image = ImageEnMView->GetTIEBitmap(pageNo-1);
this->ImageEnView->IO->AttachedIEBitmap = image;
//attach image to IO



}



But TImageEnView does not update image that it should be.
Please give me some suggestion.

Thank you.
Go to Top of Page

xequte

39140 Posts

Posted - Dec 12 2014 :  19:48:27  Show Profile  Reply
Hi

StoreType will determine where images added to a TImageEnMView are stored at full size or thumbnail:

http://www.imageen.com/help/TImageEnMView.StoreType.html


Please try:

....
// When user add image
ImageEnMView->AppendImage(OpenImageEnDialog->FileName);

...

// When user navigate page
TIEBitmap* image = ImageEnMView->GetTIEBitmap(pageNo-1);
this->ImageEnView->IO->AttachedIEBitmap.Assign( image );
this->ImageEnView->Update;




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: