Open rphlo opened 6 months ago
Emmm, I don't have an iphone/macbook to test this on safari, so I'm not sure if it would be an issue of safari instead.
The jxl image that I encoded using the plugin is able to be opened in Firefox Nightly and displayed normally:
Can you provide me some failed jxl image so that I can investigate this further?
I investigated further and the issue seems to be with images having a transparency layer. The images I tested with a transparency layer do not open in firefox nightly while the one without transparency (from JPEG) convert and open properly.
I used the following code:
import pillow_jxl
from PIL import Image
# Lossless encode a png image
with Image.open("example.png") as img:
img.save("example-lossless.jxl", lossless=True)
# encode image with JPEG-Style quality
with Image.open("example.png") as img:
img.save("example-lossy.jxl", quality=40)
Here the images: example.zip
However, all example images can be opened in Firefox Nightly 127.0a1 (2024-05-01) (64-bit):
I guess this is a decoder issue about the browser instead...
Yes, seems to works with windows firefox, but no success on macos or linux
All the images in this thread display on my iPhone in the iOS GitHub app as well as in mobile safari.
@ajslater you should as Github re-encode all pictures in posts as png. What about the images in the example.zip file of my previous message?
Woops, my bad. I just tried with desktop safari on the zipped images and while they do show as "JPEG XL Container" to the file utility, they do not open with desktop Mac Safari or the Preivew app. And indeed using this plugin to covert the enclosed png produces a similarly undisplayable jxl.
As I commented in my PR #61 the Exif metadata seems to be the problem, I modified the code to be able to generate file that open on Apple OSs.
Any release scheduled?
I tested this package to dynamically serve jxl from my server, however the images do not open in ios safari or mac safari which are supporting jxl by default.