karlch / vimiv-qt

An image viewer with vim-like keybindings
https://karlch.github.io/vimiv-qt/
GNU General Public License v3.0
179 stars 14 forks source link

heif Support to view heic images #814

Open niksingh710 opened 6 months ago

niksingh710 commented 6 months ago

feh support this type of images addition of these would be nice.

karlch commented 6 months ago

Thanks for your report!

This unfortunately isn't supported by Qt natively, yet, although there is some (old) ongoing discussion on the topic: https://bugreports.qt.io/browse/QTBUG-69212

However, there is a plugin for heif support which also has an AUR package. I was able to install this rather simply and get it running with a quick patch to the vimiv imageformats plugin in #816.

As image formats was largely developed by @jcjgraf, I would like to wait for some quick feedback before merging :blush:

niksingh710 commented 6 months ago

will be waiting for pr to be merged.

This could be irrelevant but. image image

feh has support for these extra format's also if possible their integration.

karlch commented 6 months ago

Sounds good to me :+1:

I feel like we do support a lot of these, taking directly from imageheader.py:

Native QT Support:
| ---    | ---                       | ---                                         |
| Format | Extension according to QT | Vimiv Supported                             |
| ---    | ---                       | ---                                         |
| BMP    | bmp                       | yes                                         |
| GIF    | gif                       | yes                                         |
| JPG    | jpeg, jpg                 | yes                                         |
| PNG    | png                       | yes                                         |
| PBM    | pbm                       | yes                                         |
| PGM    | pgm                       | yes                                         |
| PPM    | ppm                       | yes                                         |
| XBM    | xbm                       | yes (no distinct header, regex on file)     |
| XPM    | xpm                       | yes                                         |
| SVG    | svg                       | yes                                         |
| SVG    | svgz                      | no (is gzip compressed, how detect if svg?) |
| ---    | ---                       | ---                                         |

Extended QT Support:
| ---    | ---                       | ---                                             |
| Format | Extension according to QT | Vimiv Supported                                 |
| ---    | ---                       | ---                                             |
| ICNS   | ico                       | yes                                             |
| ICNS   | icns                      | yes                                             |
| ICNS   | cur                       | yes (TODO: is it really correct?)               |
| JP2    | TODO: ?                   | yes                                             |
| MNG    | TODO: ?                   | yes                                             |
| TGA    | tga                       | yes (only version 2, version 1 is undetectable) |
| TIFF   | tif, tiff                 | yes                                             |
| WBMP   | wbmp                      | no (is undetectable)                            |
| WEBP   | webp                      | yes                                             |
| ---    | ---                       | ---                                             |

This information is taken from the .desktop file? Possibly we don't set all the mimetypes (correctly) that we (can) support :thinking:

niksingh710 commented 6 months ago

yep it is taken from .desktop file. i am using selectdefaultapplication for arch to set mimetypes The attached screenshot is of that application.