Solved Open Image problem Qt 5.5
-
QImage *m_checkPreviewSize = new QImage("H:/untitled1000000000000000000.jpg");
qDebug() << "check size" << m_checkPreviewSize->width();If this code is to build Qt 5.4 Image load....
If this code is to build Qt 5.5 return "check size 0"
I can not understand what is wrong ... maybe something changed in version 5.5
tested Windows 7 Qt MinGW versionFix Version 5.5.1
-
Hi,
What do you get with:
qDebug() << QImageReader::supportedImageFormats();
?
-
hi, thank responded
("bmp", "cur", "dds", "gif", "icns", "ico", "jp2", "jpeg", "jpg", "mng", "pbm", "pgm", "png", "ppm", "svg", "svgz", "tga", "tif", "tiff", "wbmp", "webp", "xbm", "xpm")
last checked on Linux and Qt 5.5, everything works.
-
What kind of image is that ?
-
this image used test Link
its render program blender, do not understand why running version 5.4 and version 5.5 does not work. -
@red_spider said:
QImage *m_checkPreviewSize = new QImage("H:/untitled1000000000000000000.jpg");
qDebug() << "check size" << m_checkPreviewSize->width();Hi,
I think your render program blender don't write correctly your image.
I put some pixel with "paint" saved it.
I have the size of image:
check size QSize(900, 900)
-
as @Franckynos says the image is not 100% correct.
If you use http://regex.info/exif.cgi
you see that it reports
funny JFIF info (Resolution 1 pixels/None) (normally 72 pixels/inch)
and has an unknown APP1 segment.
Not sure what part that makes Qt not load
it but I get same results as you on win 7 with 5.5 -
yes but 5.4 no problems, tried to copy qjpeg.dll from 5.4 to 5.5 and it worked, that there were some changes in qjpeg.dll 5.5
-
@red_spider
Yeah its seems so. Also none of my image viewers have any issues with
the file so it seems a bit harsh that 5.5 dont even load it.
Could be a bug though.
https://bugreports.qt.io/browse/QTBUG-12034?jql=text ~ "jpeg" -
There seems to be a regression in 5.5.0 that's been fixed for 5.5.1. See this bug report