Join our discord community

Please or Register to create posts and topics.

Error reading some .jpg images

I'm trying to attach an image as a thumbnail but I'm getting the error "Cannot read image: C:/Users/Ember/Desktop/SQ01-SH010_preview.jpg "
The file is downloaded from Kitsu that converts all uploaded images so even if the original file worked in Prism, the image later downloaded from Kitsu does not longer work.
But I'm having this problem with some non-Kitsu jpg files also.

From my understanding you're using OIIO for all the image processing. On the page it says jpg files should work so idk what could be going on.

I'm attaching the image here so you can try it out.

Uploaded files:
  • You need to login to have access to uploads.

Prism uses not only oiio, but also some other modules in specific cases.

The problem with your attached file is that it's actually a .png file, which has the .jpg extension. If you rename it to .png it works fine.

For jpg and png image display Prism uses the image readers from Qt/PySide, which already can read these formats, but they need the correct file extension to understand what image format the content of the file is.

All my fault. .jpg was hardocded under "%s_preview.jpg" % shotName.

I fixed this and now a .png file is placed with the correct name under Shotinfo. It seems like the preview window has to read a .jpg file.

I solved this using this code in my plugin: https://hastebin.com/esoyinoqux.rb

Cheers!