Bounded PNG and baseline JPEG decoding for svgdiff embedded resources.
Dependencies
pub(all) suberror DecodeError {
InvalidSignature(String)
InvalidChunkCrc(String)
MissingChunk(String)
UnsupportedFeature(String)
CorruptData(String)
DecodeLimitExceeded(String)
}impl Show for DecodeErrorpub(all) struct RasterColorMetadata {
width : Int
height : Int
condition : RasterColorCondition
} derive(Eq, Debug)fn decode_jpeg_bounded(data : Bytes, max_dimension~ : Int, max_pixels~ : Int) -> ImageData raise DecodeErrorfn decode_png_bounded(raw : Bytes, max_dimension~ : Int, max_pixels~ : Int) -> ImageData raise DecodeErrorBounded PNG and baseline JPEG decoding for svgdiff embedded resources.
Dependencies