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 bind some information to TImageEnMView?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

wolf1860

China
15 Posts

Posted - Mar 21 2018 :  11:22:55  Show Profile  Reply
I load images from database to TImageEnMView,when I load the record,I want to bind some string value such as "Id" field value to the image item,How should I do?

w2m

USA
1990 Posts

Posted - Mar 21 2018 :  11:54:48  Show Profile  Reply
You might be able by setting one of the TImageEnMView text properties to the string from the database or by adding the string to an EXIF parameter.
ImageEnMView1.ImageTopText[i] := iDimensions + ' ' + iColor;
ImageEnMView1.ImageBottomText[i] := 'Frame ' + IntToStr(i + 1);
The text is not saved with the image.

You might also look at TIEDictionary class in hyieutils.pas. I have never used TIEDictionary, so I do not know much about it.
Look in the help file or in the online help for TIEDictionary or EXIF.

Another possible way is with WriteHiddenText/ReadHiddenText.

TImageEnProc.WriteHiddenText


Declaration
function WriteHiddenText(text: AnsiString): Integer;

Description
WriteHiddenText and WriteHiddenData write hidden text or raw data within a true color image. Hidden information is stored inside the image (uses a pixel color modulation) and is independent of the image file format.
Use WriteHiddenText to write a simple string or WriteHiddenData to write a block of bytes (e.g. to embed a hidden image or sound).

Note: The hidden text will be lost if you save the image as Jpeg or if you subsample the colors.

Example
// Hide "Copyright by XYZ" in 'alfa.tif'
ImageEnView1.Proc.WriteHiddenText('Copyright by XYZ');
ImageEnView1.IO.SaveToFile('D:\alfa.tif');

// Read simple string from 'alfa.tif'
ImageEnView1.IO.LoadFromFile('D:\alfa.tif');
mystring := ImageEnView1.Proc.ReadHiddenText;

Demo
Demos\FullApps\PhotoEn3\ImageEx.dpr

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

wolf1860

China
15 Posts

Posted - Mar 21 2018 :  21:15:55  Show Profile  Reply
Thanks for ur reply.
Maybe I did not express my request clearly,I just need the bind value when the image is loaded to the TImageEnMView,and I can get the value when the user doubleClick the image item.When I set the topText property,I don't know how to to hide it.
Go to Top of Page

xequte

38196 Posts

Posted - Mar 21 2018 :  21:47:29  Show Profile  Reply
Hi

There are a number of properties available for custom use, e.g.

https://www.imageen.com/help/TImageEnMView.ImageTag.html
https://www.imageen.com/help/TImageEnMView.ImageUserPointer.html

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

wolf1860

China
15 Posts

Posted - Mar 22 2018 :  08:47:43  Show Profile  Reply
Thanks u very much!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: