K
K
kolomiec_artiom2018-05-19 09:57:12
Qt
kolomiec_artiom, 2018-05-19 09:57:12

How to create an array of pixels in C++ QT?

Good morning!
How to create an array of pixels for an image?
I do this: But then I don’t know how to throw it into an array
QColor clrCurrent(img.pixel( row, col ));

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ighor July, 2018-05-19
@IGHOR

Why don't you like working with QImage? This is also an array of pixels.

D
Denis, 2018-05-19
@D3Nd3R

I recommend using QImage::scanLine() and there will be no unnecessary copying
doc.qt.io/qt-5/qimage.html#scanLine

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question