ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 ImageenDBview confuses me

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
pierrotsc Posted - May 03 2026 : 16:31:01
I think I am getting too old.
I have an imageenDBview component That is hiding in a pagecontrol tab. Its name is StepTablet_View
I use nexusDB database and i have a 21 step tablet grayscale.
When i export the step tablet from the database, I have a dimension of 440x20.
I have the datafield as ifJpeg or ifBitmap. tried both
I have legacybitmap true. should I ?
Selection base is iesbBitmap but not sure if i should pick iesbClientarea.
I have the width of steptablet_View as 440 and height as 20 to match I assume the image in the database

Now this is the code I have to see what is going on because it looks like i am not getting the right size whatever i try.

Steptablet_View.loadpicture();
Steptablet_View.fit;
//Steptablet_View.Proc.Resample(440, 20, rfNone, True);
showmessage(inttostr(Steptablet_view.iebitmap.width)+' '+inttostr(Steptablet_View.iebitmap.Height)); Gives me 440x48
showmessage(inttostr(Steptablet_view.width)+' '+inttostr(Steptablet_View.Height)); Gives me 660x30

Resampling does not change the values I am getting above.
How can i get my Stetablet_View to be 440x20 with the image inside that fits perfectly?

thanks
Pierre
1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - May 03 2026 : 18:18:07
Hi Pierre

It sounds like the size of the image in your database is actually 440x48, and your control is 660x30, so neither of these will give you 440x20.

If you make your control 440x20 + the size of the border area (= ImageEnView1.Client - ImageEnView1.ClientWidth), then use:

// Stretch image to control size without maintaining the aspect ratio
ImageEnView1.GetIdealZoom( zoomX, zoomY );
ImageEnView1.ZoomX := zoomX;
ImageEnView1.ZoomY := zoomY;

Note: Because the image is not the same ratio as the control, we need to do an asymmetrical zoom to fill the control completely.

See: https://www.imageen.com/help/TImageEnView.GetIdealZoom.html


Also see:
https://www.imageen.com/help/TImageEnView.IdealComponentWidth.html
https://www.imageen.com/help/TImageEnView.IdealComponentHeight.html

Nigel
Xequte Software
www.imageen.com