语言

Menu
Sites
Language
how to get pixel infomation from bitmap

how to get pixel infomation from bitmap


Hi~

I need to get pixel information from bitmap, so I want to read color of each pixel.


At developing native application on Tizen SDK 2.2.1

     // captured screenshot.
    Bitmap* capturedScreen;
    capturedScreen = SystemUtil::CaptureScreenN();

    // save image as jpg file
    Image img;
    r = img.EncodeToFile(*capturedScreen, IMG_FORMAT_JPG, imagePath, true);

 

I tied to find pixel info by using Bitmap API but I can't it.

How can I get it?

响应

1 回复
Alex Ashirov

Hi,

You can use Tizen::Graphics::BufferInfo class to get pixel info from bitmap. You can get the buffer info using Tizen::Graphics::Bitmap::Lock(). Please take a look at DrawingBoard sample in order to figure out how to use the Tizen::Graphics::BufferInfo.