Thank you very much.
I get it working. But why the read method is called so much times?
I add a debug message to your MemFileHandler::read method and get the following output:
Can I avoid these additional calls?Qt Code:
Starting /home/segi/tmp/memfilehandler/memfilehandler... read: return 2844 counter 0 read: return 2844 counter 1 read: return 2844 counter 2 ... read: return 2844 counter 27To copy to clipboard, switch view to plain text mode
Sadly there are a lot of errors at runtime:
I tried big images: e.g. /usr/share/wallpapers/default-1600x1200.png
What can I do to avoid this error?Qt Code:
Starting /home/segi/tmp/memfilehandler/memfilehandler... read: return 16384 counter 0 read: return 16384 counter 1 read: return 16384 counter 2 ... read: return 16384 counter 27 read: return 53 counter 28 read: return 16384 counter 29 libpng error: IDAT: CRC errorTo copy to clipboard, switch view to plain text mode
On jpeg files I get:
I created a new jpg with gimp (100x100px only a white background).Qt Code:
Starting /home/segi/tmp/memfilehandler/memfilehandler... read: return 378 counter 0 read: return 378 counter 1 Not a JPEG file: starts with 0xff 0xd9To copy to clipboard, switch view to plain text mode
qDebug() << QImageReader::supportedImageFormats():
What's the problem?Qt Code:
Starting /home/sebastian/tmp/memfilehandler/memfilehandler... ("BW", "EPS", "EPSF", "EPSI", "EXR", "PCX", "PSD", "RGB", "RGBA", "SGI", "TGA", "XCF", "bmp", "bw", "dds", "eps", "epsf", "epsi", "exr", "gif", "ico", "jp2", "jpeg", "jpg", "mng", "pbm", "pcx", "pgm", "png", "ppm", "psd", "rgb", "rgba", "sgi", "svg", "tga", "tif", "tiff", "xbm", "xcf", "xpm", "xv")To copy to clipboard, switch view to plain text mode
Bye




Reply With Quote


Bookmarks