I have an integer array with a gray scale image, and I need to show it in my application. I am programming in C ++ with gtkmm and I cannot find any widget like a canvas that allows you to show and access every pixel of the image.
As far as I understand, you need to use the following class with a constructor:
Gdk::Bitmap::Bitmap(const char *data, int width, int height)
to create a bitmap and upload your data to it.
Later you can use Gdk :: Pixmap or Gdk :: Window to draw. There is also a Pixbuf class for storing pixels.
. , ( gtkmm-3.0), - RGB, .
, . . 1280 * 1024 ( ), :
Gdk::Pixbuf::create_from_data(copy, Gdk::COLORSPACE_RGB, false, 8, 1280, 1024, 1280*3);
, , Gdk::Pixbuf::get_pixels().
Gdk::Pixbuf::get_pixels()
Source: https://habr.com/ru/post/1723764/More articles:Sharing Viewdata for all actions in ASP.NET MVC - asp.net-mvcJSP custom tag - detects other instances - javaHow to make a div to show scrollbars (without a fixed height)? - htmlHow to create a translucent image using imagemagick - imagemagickManaging large applications with CakePHP - phpVisual Studio: Сделать код просмотра по умолчанию с помощью атрибута - c#PHP login / logout question - phpAJAX - when the user leaves the page - good or bad practice / implementation? - javascriptUISearchBar in UITableView - uitableviewJava collection filtering - javaAll Articles