roniemartinez / libqpsd

PSD (Photoshop Document) & PSB (Photoshop Big) Plugin for Qt/C++ (Qt4/Qt5)
GNU Lesser General Public License v2.1
108 stars 25 forks source link

Fix bitmap support #6

Closed yuezhao closed 11 years ago

yuezhao commented 11 years ago

I think the error in your code is about the image data, see QImage constructor: QImage::QImage ( uchar * data, int width, int height, Format format ) Constructs an image with the given width, height and format, that uses an existing memory buffer, data. The width and height must be specified in pixels, data must be 32-bit aligned, and each scanline of data in the image must also be 32-bit aligned. The buffer must remain valid throughout the life of the QImage. The image does not delete the buffer at destruction.

roniemartinez commented 11 years ago

Thanks :) Added learning!