Loading...

Wrong Pictures proportions

Support for GdImageBox OCX and GdImageBox Pro ActiveX/SDK.

Wrong Pictures proportions

Postby MarcoLo » Mon Apr 28, 2008 2:42 pm

I search a Control which indicates pictures in a good quality. The image box fulfils my wish. Unfortunately, the proportions of the pictures are wrong indicated.

Code: Select all
Dim tPic As StdPicture
Dim tProp As Single
   
ImageBox2.ZoomMode = ZoomFitToControl
Set tPic = LoadPicture(App.Path & "\830509109N.wmf")
tProp = tPic.Height / tPic.Width    'it is 1.586
ImageBox2.Height = ImageBox2.Width * tProp
ImageBox2.DisplayFromStdPicture tPic


In the attachment the result is visible.

Excuse for my bad English.

Thank you
Attachments
TheResult.zip
(8.86 KiB) Downloaded 106 times
MarcoLo
 
Posts: 4
Joined: Mon Apr 28, 2008 2:03 pm

Re: Wrong Pictures proportions

Postby Loïc » Sun May 04, 2008 6:15 pm

Hi Marco,

Strange behavior. I have this problem only with your image.

I suggest you to use the DisplayFrommetafile() method which is included since GdViewer 2.1: http://guides.gdpicture.com/v5/gdimageb ... aFile.html

With this method you will get an excellent metafile rendering and you will keep the transparency of the image.

Best regards,

Loïc Carrère
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France


Return to GdImageBox [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest

cron