Canvas drawBitmap

Tutorials concerning the OpenGL® ES cross-platform API for full-function 2D and 3D graphics on the Google-Android platform.

Canvas drawBitmap

Postby gandrakar » Mon Apr 26, 2010 9:26 am

Hi everyone,

For a private application I manipulate pictures.

In order to test my algorithm I apply it on a picture and try to load the result on the simulator using Canvas class and drawBitmap function.

However nothing happens and it's the original picture which is displayed.

Code: Select all
Canvas newPicture = new Canvas();
      newPicture.drawBitmap(thresholdPixels, 0,calculator.getPictureHeight(), 0, 0, calculator.getPictureHeight(), calculator.getPictureWidth(), false, null);

There are no compilations errors.
Moreover, I have a second problem : My screen is in landscape mode but when I try to get picture's width android returns picture's height.

I'm working on 2.0.1 SDK
Island : We have no cash but we have ash
Once Poster
Once Poster
Posts: 1
Joined: Mon Apr 26, 2010 9:16 am
Location: Rambouillet


Return to Android 2D/3D Graphics - OpenGL Tutorials

Who is online

Users browsing this forum: No registered users and 2 guests