Wrong Pictures proportions

Discussions about document viewing.
Post Reply
MarcoLo
Posts: 4
Joined: Mon Apr 28, 2008 2:03 pm

Wrong Pictures proportions

Post by 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.83 KiB) Downloaded 334 times

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Wrong Pictures proportions

Post by 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: https://www.gdpicture.com/guides/gdpicture/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

Post Reply

Who is online

Users browsing this forum: Amazon [Bot], Majestic-12 [Bot] and 1 guest