honzasp / rust-turbojpeg

Rust bindings for TurboJPEG library
MIT License
16 stars 12 forks source link

Decode to yuv #13

Closed devguy22 closed 1 year ago

devguy22 commented 1 year ago

This provides function calls to allow user to get planar YUV images from the jpeg their decoding. There's two functions: decompressor.decompress_to_yuv, and a helper yuv_frame_size. There's also a simpler decompress_to_yuv that returns a fresh yuv image buffer, similar to the decompress method.

These functions have passing rust doctest on them. Please let me know if I can alter any style/formatting/etc to be more in line with how this library does things.

honzasp commented 1 year ago

Thank you very much for your PR! :) I merged your changes and will release a new version ASAP.

honzasp commented 1 year ago

I just released version 0.5.4 with YUV support. Thank you again for your contribution! :)

devguy22 commented 1 year ago

Much obliged! Glad I could contribute