maforget / ComicRackCE

A Community Edition for the legendary Comic Book Manager ComicRack. ComicRack is back from the dead.
GNU General Public License v2.0
213 stars 20 forks source link

[Feature Request] Add support for newer image formats #73

Open rohan-gt opened 1 month ago

rohan-gt commented 1 month ago

Hi, is it possible to add support for newer image formats like AVIF, HIEC, JPEG XL etc.?

maforget commented 1 month ago

Possibly at one point.

But are there any content using these? All this depends on existing library support for these file types. Right now except DjVU or WebP that uses external library most of the format are the one used by .NET.

Using ImageMagisk might be a solution.

5h4k3 commented 4 weeks ago

This could be an interesting addition. All my comics are now in AVIF format. This allowed me to go from a 100MB Comic to a 5/10MB one, even less sometimes while maintaining high quality (according to my taste). As a result, my entire database is on my tablet.

To achieve this, I use ComicRack-Plugin-MIFS (Modern Image Formats Support) with CR OG but unfortunately this plugin doesn't seem to work with CR CE…

So for now I'm still on Comicrack Original.

PS: I don't know if the plugin could be hard to make it viable, it seems a little bit hacky and it's "just" a decoding plugin, it doesn't add anything to CR's export/conversion integrated functions.

maforget commented 4 weeks ago

Interesting technique. I had the idea to use Harmony already to use with scripting, but injecting the code on launch is a way better technique than what I was doing with my RAR5 Pack.

That being said, it's could be very possible to basically copy/paste the code and integrate it easily. This is basically the way WebP & DejaVu are implemented, they are just converted to JPEG internally. So this would need to taken into account when patching issue #74 .

Also I believe the reason it isn't working is that it references the original dll, which are signed. ComicRackCE aren't so the signature isn't the same. Just a rebuild with the correct dll should do the trick. Although the dll version changes every build, I don't know if that is that important for Harmony.

Although if I were to implement this I would look for the source of these native libraries. If we could find libraries that would also create the files, it could be added to the export feature.

maforget commented 3 weeks ago

Depending on when you tested that plugin, one reason it will not work anymore, is that I changed the signature of one of the function that is fixed by the Harmony patch. I needed to access the size, so I changed the string to a ProviderImageInfo. Patch will need to be updated for that.