language_model: Add image decoding support for BMP and TIFF image formats (#39767)
Related: #39745 Release Notes: - Added support for pasting TIFF and BMP images in the agent panel.
This commit is contained in:
@@ -99,6 +99,10 @@ impl LanguageModelImage {
|
||||
.and_then(image::DynamicImage::from_decoder),
|
||||
ImageFormat::Gif => image::codecs::gif::GifDecoder::new(image_bytes)
|
||||
.and_then(image::DynamicImage::from_decoder),
|
||||
ImageFormat::Bmp => image::codecs::bmp::BmpDecoder::new(image_bytes)
|
||||
.and_then(image::DynamicImage::from_decoder),
|
||||
ImageFormat::Tiff => image::codecs::tiff::TiffDecoder::new(image_bytes)
|
||||
.and_then(image::DynamicImage::from_decoder),
|
||||
_ => return None,
|
||||
}
|
||||
.log_err()?;
|
||||
|
||||
Reference in New Issue
Block a user