[Qt-interest] QImage fails to save without any error message
Matthias Pospiech
matthias.pospiech at gmx.de
Thu Oct 29 15:03:51 CET 2009
I have a programm which saves continously images. This worked in the
past without any problem.
Today I realized that it fails depending on the path.
So an image with this name will never be saved:
"W:/Projekte/Hibiscus/LaborDatenAuswertungen/Chirped-Gratings/Filme/2009-10-29/CG-Period20-Depth5/CG-Period20-Depth5-01-0-movie-399.png"
whereas this one works:
"E:\Daten\Dev\SVN\hibiscus\Cpp\ShapedMaterialProcessing\test\testMovie-0-movie-0.png"
The QImage returns directly and gives no hint that saving failed.
It is called as (only the last line matters)
QImage saveimage = QImage(Monitor.width(),Monitor.height(),
QImage::Format_RGB32);
saveimage.fill(QColor(0,0,0).rgb());
QPainter painter( &saveimage );
int offsetx = (Monitor.width() - image->width())/2;
painter.drawImage(offsetx, 0, *image );
saveimage.save(imagesavename,"PNG");
Any idea what is going on? QT is 4.5.2
Matthias
More information about the Qt-interest-old
mailing list