Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Adobe AIR Development

Reply
Trusted Contributor
SumiGhosh
Posts: 181
Registered: 09-20-2011
My Carrier: Developer

How to set the size of bitmap.

I have a list of images, which is reproduced from database. I am able to reproduce the images but with different image width. What to do to set the size of width for all images into one. I tryed out with some examples but not able to get the output i required. Can anyone point out the way how to do this. 

Please use plain text.
Developer
jtegen
Posts: 4,247
Registered: 10-27-2010
My Carrier: Verizon

Re: How to set the size of bitmap.

I think you are asking that you want to set different images that have different widths (and heights) so that all have the same width. Assuming you can determine the width that you want, you have to proportionally change each one by the percent of the current width to the desired width. Depending on the proportions of the image, the width may not be the dominate edge. Tall images will require the height to be the governing dimension. Once you deterine the proper edge and the percent that you need to scale the image, use the image scaleX and scaleY function to set to the same value.
Please use plain text.