T O P I C R E V I E W |
adisonx |
Posted - Dec 10 2014 : 22:43:04 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.
|
4 L A T E S T R E P L I E S (Newest First) |
xequte |
Posted - Dec 12 2014 : 19:48:27 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 |
adisonx |
Posted - Dec 12 2014 : 04:02:19 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. |
adisonx |
Posted - Dec 12 2014 : 03:32:08 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. |
xequte |
Posted - Dec 11 2014 : 14:45:41 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 |