Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 168
Registered: ‎11-01-2008
My Device: Galaxy S II
My Carrier: Meteor (Ireland)

Re: Removing resizing artifacts when downscaling using scaleImage32

If it's very important you could just write your own scaling method to use whatever interpolation works best for the type of source images your app works with. This wouldn't be very difficult to do, as I'm sure you'll find plenty of Java sample code online.

 

The only things that would be BB specific would be fetching the pixel values from your original image (use Bitmap.getARGB() or Bitmap.getRGB565()) and setting the pixel values in the scaled image (use Bitmap.setARGB() or Bitmap.setRGB565()).

Developer
Posts: 39
Registered: ‎05-26-2009
My Device: BlackBerry Storm 9550

Re: Removing resizing artifacts when downscaling using scaleImage32

Ok, that looks like that's the only thing I can really do, so I'll check out some j2me resizing samples. Thanks for the suggestion.
Highlighted
Developer
Posts: 177
Registered: ‎01-21-2009
My Device: 9900
My Carrier: Vodafone

Re: Removing resizing artifacts when downscaling using scaleImage32

I would suggest using Graphics.drawTexturedPath()

 

With that you can implement zooming animations, and the quality is pretty good when scaling down.