Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Using Bitmap Interfaces

Base version: Brew MP 1.0
Tested version: Brew MP 1.0
Phone tested: Yes

Applications can use the Brew® Mobile Platform (Brew MP) IBitmap, IBitmapFX, and IBitmapScale interfaces to rotate or scale bitmap images, as well as add effects such as negative or grayscale.

The code examples shown in this document are from the c_samplebitmap application, which allows the user to select an image from a gallery, then select an effect from the Options menu, which is added to the bitmap and redisplayed.

Objective

This document shows how to use the IBitmap, IBitmapFX, and IBitmapScale interfaces to do the following:

  • Rotate a bitmap
  • Scale a bitmap
  • Add effects to a bitmap

Requirements

To use the IBitmap, IBitmapFX, and IBitmapScale interfaces, the following files needed to be included in the application:

  • AEEBitmap.h
  • AEEIBitmapFX.h
  • AEEIBitmapScale.h
  • AEEBitmapFX.bid
  • AEEBilinearScale.bid

Sample code location

ZIP filename

Location

Run app

c_samplebitmap.zip

Brew MP Resources

  • Download and extract the ZIP file.
  • Compile the app.
  • Run it on the Brew MP Simulator.

Note: To compile the sample application and run it on a device, you need the Visual Studio plugin, which can be installed from the Brew MP Launcher. You will also need the appropriate compiler for the device.

When running the application, you can save an image after adding effects. If you are running the application on a device, the newly saved image will be displayed on the screen in the gallery. The new image is not displayed in the gallery when you run the application on the simulator.