标题: Qt 的QImage 像素操作 [打印本页] 作者: 农民 时间: 2025-2-16 16:38 标题: Qt 的QImage 像素操作 QRgb QImage::pixel(const QPoint &position) const
Returns the color of the pixel at the given position.
If the position is not valid, the results are undefined.
Warning: This function is expensive when used for massive pixel manipulations. Use constBits() or constScanLine() when many pixels needs to be read.
See also setPixel(), valid(), constBits(), constScanLine(), and Pixel Manipulation. ⚠️ 告诫:性能问题
"Warning: This function is expensive when used for massive pixel manipulations."
⚠️ (告诫: 该函数在大规模像素操作时代价昂贵) 为什么 pixel(x, y) 慢?