You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
currently there is only "reader_size" which calls "formats::image_type()" which also supports a reader.
So an "reader_type" would be useful.
Another function would also be useful: "type_size(image_type, reader)" if we need both data, so we don't look up the size two times.
/// [`ImageError`]: enum.ImageError.htmlpubfnreader_size<R:BufRead + Seek>(mutreader:R) -> ImageResult<ImageSize>{dispatch_header(&mut reader)}/// Calls the correct image size method based on the image type////// # Arguments/// * `reader` - A reader for the data/// * `header` - The header of the filefn dispatch_header<R:BufRead + Seek>(reader:&mutR) -> ImageResult<ImageSize>{match formats::image_type(reader)? {ImageType::Aseprite => aesprite::size(reader),ImageType::Bmp => bmp::size(reader),ImageType::Dds => dds::size(reader),
The text was updated successfully, but these errors were encountered:
lublak
changed the title
[feature request]
[feature request] reader_type + type_size
Dec 19, 2024
currently there is only "reader_size" which calls "formats::image_type()" which also supports a reader.
So an "reader_type" would be useful.
Another function would also be useful: "type_size(image_type, reader)" if we need both data, so we don't look up the size two times.
The text was updated successfully, but these errors were encountered: