[Qt-interest] QImage bytesPerLine != width()*depth()/8 Why?

MARTIN Pierre hickscorp at gmail.com
Wed Sep 21 01:39:51 CEST 2011


Thanks Rohan for your answer,

> QImage enforces that the address of each line starts on a multiple of 4
> bytes.  Therefore, 1377 was rounded up to 1380 in your case.
Well, i understand for 32bpp ARGB images. But why is it so for 8bpp images? This defeats ease of communication with other APIs which expect "inline" scan-lines.
Is there a way to force QImage to have it's Bpl = width when depth = , without copying it manually to another memory area?

Pierre.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110921/bbf75075/attachment.html 


More information about the Qt-interest-old mailing list