das Problem ist eigentlich ganz einfach.
Ich möchte ein Graustufenbild, also channel = 1, depth = 8 bit, erzeugen und das mit einem Graustufenwert auffüllen. Das mache ich so:
Code: Alles auswählen
QImage *qtImage = new QImage( 1024, 768, QImage::Format_Indexed8 ); // Anlegen eines Bildes auf dem Heap
qtImage->fill(200); // auffüllen mit hellem GrautonCode: Alles auswählen
QLabel *label = new QLabel();
label->setPixmap( QPixmap::fromImage(*qtImage) );
label->show();Code: Alles auswählen
Debug Error!
Program: ...
Module: 4.1.4
File: d:\programme\qt4\4.1.4\src\corelib\global\qglobal.cpp
Line: 2087
ASSERT failure in QVector<T>::at: "index out of range", file d:\programme\qt4\4.1.4\src\corelib\tools\qvector.h, line 213
(Press Retry to debug the application)Kann mir da jemand weiterhelfen ?