Home | About us | Overview | Software - Download | Evaluate | Order | Support | Contact | F.A.Q. | Documentations | Blog | Newsletter
Loading...

Ignore Aspect Ratio?

Support for GdViewer OCX and GdViewer Pro ActiveX/SDK.

Ignore Aspect Ratio?

Postby paulclarke » Thu Feb 18, 2010 11:05 am

Hi Loic,
Firstly - great work on GDViewer....I've been using my licensed copy for a couple of days now and seems to be working really well.

I need to show images and parts of images with non-standard aspect ratio (i.e. not the image's native aspect ratio).
The reason I need to do this is because I display images on screens that do not have square pixels so I need to distort the image before I display it so that it looks right again on the screen.
For example, a screen has pixel aspect ratio of 2:1 (each pixel is rectangular), so to display a 16:9 image on it, I would need to adjust the image aspect ratio to 8:9 so that it looks right when displayed.

I see two ways of doing this, can GDViewer help with either?

1. I need to view parts of images with the aspect ratio ignored (so I can 'set' the aspect ratio by sizing the GDViewer control myself). Is there any way to ignore the picture aspect ratio and display the image stretched to the size of the control AFTER you have done a zoom? I know I can do SetZoomControl to show the whole image without aspect ratio, but I then want to do ZoomArea(x, y, w, h) and see that exact rectangle filling the control.

2. Even better than this would be an Aspect Ratio multiplier I could set, so that GDViewer uses it in all its calculations but otherwise works as it does now. I would like to set an aspect ratio multiplier of 0.5 (in this example) in GDViewer to do this. A double value for aspect ratio multiplier would be sufficient to cover all cases.

I would be willing to contribute to the coding of this if it would help...it is something I really need!

Cheers, Paul.
paulclarke
 
Posts: 4
Joined: Wed Feb 17, 2010 11:44 am

Re: Ignore Aspect Ratio?

Postby Loïc » Thu Feb 18, 2010 11:56 am

Hi Paul,

We don't have internal mechanism in GdViewer to provide custom aspect ration (excepted the zoom mode you mentioned).

However, using the GdPicture Pro Imaging SDK you can do that modifying the image vertical or horizontal resolution. just with 3 lines of code !

IE:

Code: Select all
Imaging1.SetNativeImage (GdViewer1.GetNativeImage)
Imaging1.SetHorizontalResolution (Imaging1.GetHorizontalResolution * 0.5)
GdViewer1.Redraw


maybe you have a GdPicture Pro license ? If not, you can ask for a discount to our sales department: esales (at) gdpicture (dot) com.

Hope this helps,

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


Return to GdViewer [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest