QImage doesn't seem to support older GIF images?
-
QtImage does not seem to support older images
Hi, I have an older image in the form of a .gif
If I convert it online to some PNG it works fine, but not in its older format. Is this some bug in QT? (example below)
isNull()always returnstrueQImage myImage{":/example.gif"}; std::cout << (int)myImage.isNull() << std::endl;
-
QtImage does not seem to support older images
Hi, I have an older image in the form of a .gif
If I convert it online to some PNG it works fine, but not in its older format. Is this some bug in QT? (example below)
isNull()always returnstrueQImage myImage{":/example.gif"}; std::cout << (int)myImage.isNull() << std::endl;
@NightShadeI said in QImage doesn't seem to support older GIF images?:
QImage myImage{":/example.gif"};
I doubt this - are you sure :/example.gif is correct? Please check with QFile::exists()
-
QtImage does not seem to support older images
Hi, I have an older image in the form of a .gif
If I convert it online to some PNG it works fine, but not in its older format. Is this some bug in QT? (example below)
isNull()always returnstrueQImage myImage{":/example.gif"}; std::cout << (int)myImage.isNull() << std::endl;
@NightShadeI
I'm with @Christian-Ehrlicher on this: please check 100.00% that:/example.gifreally, really is right, because I/we think it's not, and that's why you're getting a null image. If necessary try puttingexample.gifas an external file instead of embedded resource to verify. -
@NightShadeI said in QImage doesn't seem to support older GIF images?:
QImage myImage{":/example.gif"};
I doubt this - are you sure :/example.gif is correct? Please check with QFile::exists()
I have verified it does exist with
QFile::exists(returnstrue) and also triedQImage::load, and it still does not work with thisLike I mentioned, If I put the image in some online converter to a png, and then use that png this does work. So I suspect Qt is not supporting this type of image.
LIke I mentioned the format here is likely very old (im talking maybe 1996). Can you try download the image and see if you get this issue too?
-
I have verified it does exist with
QFile::exists(returnstrue) and also triedQImage::load, and it still does not work with thisLike I mentioned, If I put the image in some online converter to a png, and then use that png this does work. So I suspect Qt is not supporting this type of image.
LIke I mentioned the format here is likely very old (im talking maybe 1996). Can you try download the image and see if you get this issue too?
@NightShadeI Works for me. Do you have the gif plugin in
<your app>/imageformats/directory deployed along with your app? Do other gif files work? -
I have verified it does exist with
QFile::exists(returnstrue) and also triedQImage::load, and it still does not work with thisLike I mentioned, If I put the image in some online converter to a png, and then use that png this does work. So I suspect Qt is not supporting this type of image.
LIke I mentioned the format here is likely very old (im talking maybe 1996). Can you try download the image and see if you get this issue too?
@NightShadeI
Same for me as for @Chris-Kawa. Just try Qt Designer, put aQLabelon a form, usepixmapproperty, drop down arrow, Choose file..., pick the.gif. I see it fine. You can probably do it for a resource file too. Does that work for you in Creator/Designer? -
@NightShadeI Works for me. Do you have the gif plugin in
<your app>/imageformats/directory deployed along with your app? Do other gif files work?Ah that is embarassing, yes I hadn't added that plugin directory .. that's exactly the issue. Sorry to waste both of your times , thanks for the help also though :)
-
N NightShadeI has marked this topic as solved on