[cross posted] on PEF, better to have answer here: On 1/12/06, Shimon Shnitzer <[EMAIL PROTECTED]> wrote: > I have a bitmap (160x160) I use as a background for my app. > Now with DIA my screen opens to 160x240 or 240x160, and I > need to to fill the screen with a bitmap. > > I found if I use a 240x240 bitmap as a resource, it works, but - > the bitmap is twice in size, and I dont want to bloat my app > this way. What I thought I will do is use the old 160x160 bitmap, > and expand it if needed o 240x240 programatically. > Is there a way you guys are aware of to do it ?
you can implement your own scaling algorithm to go from 160x160 -> 240x240. the concept is that you'll make a 2x2 grid a 3x3 one. thats the basis for your scaling. you can try this: [A][B] [C][D] becomes [A][E][B] [G][X][H] [C][F][D] E = avg(A+B) F = avg(C+D) G = avg(A+C) H = avg(B+D) X = avg(E+F) you can write scalers quite quickly; obviously, there are better techniques. however, faster = lower quality, slower = better quality. it really depends on the bitmap as well. -- // Aaron Ardiri -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/