-
Notifications
You must be signed in to change notification settings - Fork 30
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image Format Issue Tracker. #9
Comments
cc @Shnatsel , PSD decoding landed(limited in scope, not fully working), thought you might be interested. |
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. |
PNG also has an animated variant, APNG, which is now supported by all web browsers as well as the Rust |
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:
***@***.***>
|
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 |
Is the BMP format in scope? It should be relatively trivial, but I don't see it mentioned explicitly. |
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 ) |
Added And added an |
@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 |
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. |
Perfomance wise with Didn't know about Will cc you when I think it's ready for fuzz-testing |
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. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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.
The text was updated successfully, but these errors were encountered: