Image Format Issue Tracker. #102
Replies: 20 comments 18 replies
-
cc @Shnatsel , PSD decoding landed(limited in scope, not fully working), thought you might be interested. |
Beta Was this translation helpful? Give feedback.
-
Is there a way to toggle which decoders are compiled, or some way to toggle them at runtime? In many cases it would be nice to disable PSD support either to reduce attack surface (e.g. an image format converter accepting untrusted input) or just not to advertise support for a format that is not complete (e.g. in a desktop image viewer). PSD is an immensely complex format, and full support for it is a multi-year effort. |
Beta Was this translation helpful? Give feedback.
-
PNG also has an animated variant, APNG, which is now supported by all web browsers as well as the Rust |
Beta Was this translation helpful? Give feedback.
-
Yea that's on my radar
Webp + avif also have animation. Will be interesting to see how the final
api version looks
…On Sun, 27 Nov 2022, 19:01 Shnatsel, ***@***.***> wrote:
PNG also has an animated variant, APNG
<https://en.wikipedia.org/wiki/APNG>, which is now supported by all web
browsers <https://caniuse.com/apng> as well as the Rust png and image
crates. It would be nice to support that as well eventually.
—
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFZRVE4I6MH3MJHE4KGLCULWKOAWBANCNFSM6AAAAAASMSO2QE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
For PSD complexity you make an interesing case, Just found out ffmpeg supports PSD files, i.e https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/psd.c that's their implementation. The I was using stb as a basis for my PSD implementation. about 246 LOC at https://github.com/nothings/stb/blob/8b5f1f37b5b75829fc72d38e7b5d4bcbf8a26d55/stb_image.h#L6002-L6248. Currently we throw out a lot of data we don't need, i.e layers and such to just get the image, the same with ffmpeg and stb. Imagemagick does not do this, and the features it implements aren't I'd rather not disable it, for the command line and add it under a feature , say |
Beta Was this translation helpful? Give feedback.
-
Is the BMP format in scope? It should be relatively trivial, but I don't see it mentioned explicitly. |
Beta Was this translation helpful? Give feedback.
-
Hi, BMP support is planned. The plan is to support at least anything image-rs supports first.(Like farbfeld decode support landed but can't currently be encoded, working on that one over the weekend). This issue should probably be restructured in the way it is(I.e tracking image status and planned times ) |
Beta Was this translation helpful? Give feedback.
-
Added And added an |
Beta Was this translation helpful? Give feedback.
-
@Shnatsel , Finished a simple PNG decoder. Doesn't do a lot yet, only works with 8 bpp pixel images but I think you'll love the speeds at Uses a custom zlib decoder at The speedups actually don't even come from that. Will work on finishing this and the jpeg decoder for now |
Beta Was this translation helpful? Give feedback.
-
That's excellent news, thanks for sharing! I'm curious, how does Also, I should have mentioned it earlier, but WUFFS has a fast PNG decoder and detailed explanation of why it's fast, and there's also libspng that beats libpng. You might be able to lift some tricks from those and push performance even further. |
Beta Was this translation helpful? Give feedback.
-
Perfomance wise with Didn't know about Will cc you when I think it's ready for fuzz-testing |
Beta Was this translation helpful? Give feedback.
-
FWIW what I've been doing so far is testing on real-world images instead of fuzz testing. Fuzzing produces random/invalid data to trigger unexpected codepaths, like panics or memory safety bugs. Fuzzing usually finds a large amount of rather boring panics, so I've put it off until the correctness on real-world images is established. |
Beta Was this translation helpful? Give feedback.
-
Added jpeg encoding support, via jpeg-encoder, I figured there is no need for me to do it, since it does it quite better than whatever I'll do. But it allowed me to finally do some testing that makes sense.
The command to run was |
Beta Was this translation helpful? Give feedback.
-
@Shnatsel added small support for lossless jpeg-xl support. Currently uses 4 threads to encode, pretty neat imo Pinging you to run on corpus, not yet fuzz tested |
Beta Was this translation helpful? Give feedback.
-
Ah, I see it's the encoder, not decoder. In that case the corpus doesn't matter. I can write a fuzz target, it just won't need any particular corpus. I understand roundtrip fuzzing is not useful yet because there's no JPEG XL decoder? A multithreaded JPEG XL encoder is certainly interesting, I wish the format had more uptake. |
Beta Was this translation helpful? Give feedback.
-
Made a png release |
Beta Was this translation helpful? Give feedback.
-
the 0.17-8-rc with new optimizations
…On Sat, 1 Apr 2023, 17:08 Shnatsel, ***@***.***> wrote:
Which png crate version are you comparing against now?
—
Reply to this email directly, view it on GitHub
<#102 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFZRVE4WA7HATPM7BHQZZU3W7AZG7ANCNFSM6AAAAAAWAIA3HA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
@Shnatsel made 0.2 https://crates.io/crates/zune-png, Feel free to announce whenever you are ready |
Beta Was this translation helpful? Give feedback.
-
Hi everybody, thanks a lot for all the impressive work you've done here. I was wondering if PNG encoding is planned? |
Beta Was this translation helpful? Give feedback.
-
I was wondering if zune-image would be on a "off by default basis" due to it's complexity (and not yet quite ready state) be willing to implement avif decoding using the rav1d crate in the future? I understand that it goes against the "minimal" and even possibly "no large crates" (also the decoder is not yet "safe"). fully understand if it's a hard no as it is a rather large crate, and you also need to wind up using an mp4 parsing crate. but it could be nice to have, I ask because it seems like jxl-oxide was implemented for decoding jxl images. https://github.com/memorysafety/rav1d |
Beta Was this translation helpful? Give feedback.
-
Image formats tracker.
This issue tracks currently supported images and gives details on their status and tracking issues.
Formats currently able to decode
Priority of decoders follows the following criteria.
First class image formats.
Images present everywhere and used for everything, and by first class support, we want to have excellent decoding +encoding of almost all images for that format.
Support for such takes priority.
1. JPEG
Full support is about to be complete, what is left is some polishing and some decoder fixes,
works on a lot of images but some cause errors, looking into them.
2. PNG
Not yet working, but work is underway, mainly spending time translating Eric Bigger's libdeflate to Rust, but support should be soon.
3. GIF.
Limited by the fact that I haven't decided how frame API will look, so this will take a while
Second class image formats.
Image formats on the rise
4. WEBP + AVIF + JPEG-XL+HEIF
Complicated and complex beasts, support for these formats will take a while, probably a year or so , decoding support should be pure rust(there is no hurry to reach production at all), while encoding should be their C libraries (encoding is another complicated beast and man has 24 hours a day).
Other file formats.
Support is welcome.
Beta Was this translation helpful? Give feedback.
All reactions