
Bitmap scaling
You can scale bitmap images by using the Bitmap.scaleInto() method that is provided in the
net.rim.device.api.system package. The method creates a scaled copy of the original bitmap image. When you scale
a bitmap image, you can specify a filter and whether to maintain the aspect ratio of the original image. The filter controls the
interpolation of the scaled bitmap image.
The following table describes the filtering options and illustrates the effects of the filter on a scaled image.
Filter Description
FILTER_BOX This filter has fast performance but provides a bitmap image of low quality.
FILTER_BILINEAR This filter has performance that is slower than the FILTER_BOX filter but provides an image
of better quality.
FILTER_LANCZOS This filter has slow performance but provides a bitmap image of high quality.
For more information about bitmap scaling, see the BlackBerry Java Application Multimedia Development Guide and the API
reference for the BlackBerry® Java® Development Environment.
Bitmap image comparison
You can compare bitmap images by using the Bitmap.locateDifference() method that is provided in the
net.rim.device.api.system package. For example, you can compare two versions of an image changes that were made
to the image. After you identify the changes, you can render only the parts that changed and avoid repainting a screen
unnecessarily.
For more information about comparing bitmap images, see the BlackBerry Java Application Multimedia Development Guide
and the API reference for the BlackBerry® Java® Development Environment.
Feature and Technical Overview
Multimedia
13
Komentarze do niniejszej Instrukcji