phillipberndt / pqiv

Powerful image viewer with minimal UI
http://www.pberndt.com/Programme/Linux/pqiv/index.html
GNU General Public License v3.0
303 stars 45 forks source link

archive_cbx.c incorrectly assumes only JPEG/PNG files #243

Open ratinoxone opened 1 month ago

ratinoxone commented 1 month ago

archive_cbx.c:

* Such files are guaranteed to contain _only_ jpg/png files, which allows
 * to handle them directly using a gdkpixbuf.

This is not guaranteed. There are no formal specifications for cbX files. While JPEG and PNG are the most common formats, GIF and BMP files are not excluded. Disabling the archive_cbx backend is a workaround for this.

Edit: disabling the backend is a workaround for animated GIFs not playing.

phillipberndt commented 1 month ago

Thanks! These formats are also supported by GdkPixbuf. Did you see an archive with a format that is not in the wild?

ratinoxone commented 1 month ago

Only one with a single animated GIF in the archive which would not play when the archive was named *.cbz. Disabling the backend is a workaround for this (I updated the first comment with this information).

I do not have the archive any more but I will see if I can find it again. It was a one-off thing, so I don't know that any code changes or fixes are required to accommodate it when disabling the backend for this one file worked. Maybe just a note in the man page for anyone else who stumbles across this.