LINUX.ORG.RU

wxBitmap, как работать попиксельно


0

0

Загружаю картинку в тип wxBitmap. Все прекрасно, всё работает.

Но теперь мне нужно попиксельно анализировать изображение. Как мне это сделать (получить доступ к конкретным пикселам). В мануале с описанием классов wx подобного не нашёл. Может плохо искал unsure.gif

Подгружать картинку вручную как-то не хочется. Думается мне , что возможность попиксельного доступа всё же есть.

★★

Попробуй вот так....

wxImage image = bpm_object->ConvertToImage();
unsigned char * data = image->GetData();

---------------------------------------

unsigned char* wxImage::GetData() const

Returns the image data as an array. This is most often used when doing direct image manipulation. The return value points to an array of characters in RGBRGBRGB... format in the top-to-bottom, left-to-right order, that is the first RGB triplet corresponds to the pixel first pixel of the first row, the second one --- to the second pixel of the first row and so on until the end of the first row, with second row following after it and so on.

dlomin
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.