getmango / Mango

Mango is a self-hosted manga server and web reader
https://getmango.app
MIT License
1.69k stars 118 forks source link

Add Jxl support #312

Closed tr7zw closed 2 years ago

tr7zw commented 2 years ago

Closes #306

hkalexling commented 2 years ago

Thanks for the PR!

Re the 0 width/height issue you mentioned in #306, the width and height of each page is generated with the image_size.cr shard which I maintain:

https://github.com/hkalexling/Mango/blob/61dc92838ab2933414360cef3d01617b639bbd5e/src/library/entry.cr#L171-L176

JXL is not one of the supported image types and so it's returning 0. I will have to update the shard and include a C library for paring JXL files for it to work.

For now I think setting them to 100% is an acceptable workaround.

hkalexling commented 2 years ago

LGTM!