[ Show ]
Support VoyForums
[ Shrink ]
VoyForums Announcement: Programming and providing support for this service has been a labor of love since 1997. We are one of the few services online who values our users' privacy, and have never sold your information. We have even fought hard to defend your privacy in legal cases; however, we've done it with almost no financial support -- paying out of pocket to continue providing the service. Due to the issues imposed on us by advertisers, we also stopped hosting most ads on the forums many years ago. We hope you appreciate our efforts.

Show your support by donating any amount. (Note: We are still technically a for-profit company, so your contribution is not tax-deductible.) PayPal Acct: Feedback:

Donate to VoyForums (PayPal):

Login ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 12345[6]78910 ]

[ Next Thread | Previous Thread | Next Message | Previous Message ]

Date Posted: 20:00:35 02/11/02 Mon
Author: Michel
Subject: Re: Fax TIFF in Fine Mode
In reply to: glub 's message, "Re: Fax TIFF in Fine Mode" on 04:57:51 02/09/02 Sat

Hi Glup,

You have surfaced interesting points. Envision currently assumes x and y resolutions are the same for display purposes.

I think both approaches are valid, but are different in their nature.

Solution 1 forces you to explicitely perform a transformation if the X/Y resolution is not the same.

Solution 2 would compensate without you knowing, so if you do a SaveToStream/File the dimensions of you image would have changed.

Sometimes a user wants to work in pixels, but when sending output to a printer, the resolution is important (where Envision does not handle different x/y resolutions).

Solution 1 would not interfere with any existing code which I think is important. The TAspectRatioTransform is actually just a TResizeTransform with the proper dimensions.

I think what we need is a simple function that returns a new size of graphic given an original size, original XDpi, original YDpi, destination XDpi, YDpi. Then this size could be used with the TResizeTransform. Or this could be a method of the TResizeTransform.

The same could be applied when printing on a printer that has a different x/y resolution.

Does that sound good?

Best regards,


>I have now looked deeper in:
>It seams that TDibGraphic sets the X- and Y-Resolution
>of the DC correct, but if anyhow these values for the
>DC of the Form (actual the Monitor) are different, the
>aspect ratio of the displayed version of the graphic
>is not correct.
>Beside I would expect that the OS/GDI cares for this
>(would be a part of a "real" device _independent_
>bitmap) I see two possible solutions:
>1. I create for each DC I want to show the Dib on a
>"new" Dib with a aspect ratio changed to the ratio of
>the DC. This would ask for a TAspectRatioTransform.
>2. Everytime the TDibGraphic has to draw itself into a
>Cavas where the aspect ratio is different than the the
>own, it changes the aspect ratio "on-the-fly" with
>StretchBlt resp. StretchDIBits.
>The last version would be the more apealing I belive,
>but I see problems if code is asking for width and
>height. To solve this these both properties should
>!!!not!!! provide the sizes in pixel, but in mm, cm,
>inch, point or what-so-ever that is independent from
>the aspect ratio!
>Shouldn't option 2 with the change to the height and
>width property be implemented in TDibGraphic?

[ Next Thread | Previous Thread | Next Message | Previous Message ]


[ Contact Forum Admin ]

Forum timezone: GMT-5
VF Version: 3.00b, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2019 Voyager Info-Systems. All Rights Reserved.