Hi, Downscaling of a bitmap image can be done in a number of ways (downsampling is a better term and procedure).
The real problem is: what do you expect the outcome to be, if you scale down a line graphic of 1 pixel width, or a detail in the bitmap of 1 pixel in the original 50x50 bitmap that has to be scaled to 15x15 pixels, i.e. 330% down! (this is the original question). One third of a pixel? Do it any way you like it, but the result has to be 1/3 of a pixel whatever that means and however this appears ... :) thanks George --- In [email protected], "flexaustin" <flexaus...@...> wrote: > > Yes, code would be great! I can't believe how difficult this is to get > implemented. Hope these things become easier in Flex 5. > > J > > --- In [email protected], "ag_rcuren" <robert.vancuren.jr@> wrote: > > > > I ran into this same problem and could not find and easy fix. I ended up > > extending the LinkButton class. I created a button class that can load it's > > icons on the fly from any where local, net, or embedded. Instead of needing > > to set them strictly to Class I created a iconSource property. This allowed > > me to load the image scale it down and then use that scaled image as the > > icon. This required some trickery as you have to get the icon for each > > state by name and manually add your custom icons, but it does work just > > fine. I don't have time to include code right now but I can post some > > example code later if you would like. I hope what I said made sense. > > > > > > --- In [email protected], "flexaustin" <flexaustin@> wrote: > > > > > > I am trying to use a LinkButton in my app and assign an image to the icon > > > variable, but I need to scale down or make sure the image isn't any > > > larger than 15 x 15 pixels. > > > > > > Is there a way to scale a class file? I tried to load a png file then > > > convert the png to Bitmap, tried BitmapData, and tried BitmapAsset and > > > then scale the embedded image, but non of this worked. > > > > > > So to recap embed and image (which is 50x50 pixels) and shrink it down to > > > (15x15 pixels) and assign it to a linkButtons icon. > > > > > > Anyone know of a solution? > > > > > >

