I am using this library to resize video frames from Gstreamer. Gstreamer sometimes creates frame buffers which are oversized.
When calling ImageView::from_buffer before resizing such frames, fast_image_resize returns error ImageBufferError::InvalidBufferSize. I expected that an oversize buffer would not cause an error.
For comparison, the image crate's "equivalent" type ImageBuffer::<Luma, &[u8]> does accept buffers which are oversized.
(It is easy to slice the buffer down to the right size before passing it into this crate, but it would be nice if this was not necessary)
(P.S. This crate is very fast :) -- it is nice to be able to resize frames in rust with competetive speed to resizing inside the Gstreamer pipeline)
I am using this library to resize video frames from Gstreamer. Gstreamer sometimes creates frame buffers which are oversized.
When calling ImageView::from_buffer before resizing such frames, fast_image_resize returns error ImageBufferError::InvalidBufferSize. I expected that an oversize buffer would not cause an error.
For comparison, the image crate's "equivalent" type ImageBuffer::<Luma, &[u8]> does accept buffers which are oversized.
(It is easy to slice the buffer down to the right size before passing it into this crate, but it would be nice if this was not necessary)
(P.S. This crate is very fast :) -- it is nice to be able to resize frames in rust with competetive speed to resizing inside the Gstreamer pipeline)