Subject | Re: [IBO] Problems with strech (JPEGImage) |
---|---|
Author | Helen Borrie |
Post date | 2007-10-29T12:17:28Z |
At 10:24 PM 26/10/2007, you wrote:
You have an IB_JPEGImage that is 298 pixels wide and 358 pixels high.
You have a JPG image that is 900 pixels wide and 675 pixels high.
Therefore, the control and the image have completely different aspect ratios, i.e. you are trying to display a landscape image in a portrait container. The control in your example behaves exactly as it should: it takes the width of the image and scales it to fit the width of the control. It scales the height of the image accordingly, centres the scaled image and paints the "empty" space white.
Did you expect that it would distort the image by breaking its aspect ratio and coercing the height to fill the container from top to bottom?
Helen
>HiI've looked at your example and watched your arguments and now I am less clear than ever in understanding what you want.
>I am using TIB_JPEGImage for showing some picture.
>My problem is.
>I set
>Stretch = True
>Center = True
>AutoSize = False (the real picture is smalleer)
>
>the picture dosent strecth like I need
>she put the original picture in the center and the rest is filled with
>color White (Component Color).
>any advice ?
You have an IB_JPEGImage that is 298 pixels wide and 358 pixels high.
You have a JPG image that is 900 pixels wide and 675 pixels high.
Therefore, the control and the image have completely different aspect ratios, i.e. you are trying to display a landscape image in a portrait container. The control in your example behaves exactly as it should: it takes the width of the image and scales it to fit the width of the control. It scales the height of the image accordingly, centres the scaled image and paints the "empty" space white.
Did you expect that it would distort the image by breaking its aspect ratio and coercing the height to fill the container from top to bottom?
Helen