Files
craft-libs/crates/image-codecs/src/codecs.rs
T
ljkx 7adcc9a6c2 image-codecs: BMP keeps its resolution in the header's pixels per metre
A BMP stores its resolution in biXPelsPerMeter and biYPelsPerMeter
(BITMAPINFOHEADER and later). The image crate writes 0 there and nothing
read the fields, so a 300 ppi image saved as BMP reopened at 72 ppi and an
opened BMP's resolution was lost (storytold/photocraft#13630).

decode now reads the fields into Metadata::dpi, encode writes
Metadata::dpi into them whatever embed_metadata says, and
caps(Format::Bmp).dpi is true. encode_bmp_indexed_with_dpi is the palette
writer with a resolution; encode_bmp_indexed keeps its signature and output.
2026-11-16 10:05:03 +01:00

36 lines
837 B
Rust

pub(crate) mod avif;
#[cfg(all(feature = "avif-decode", not(target_arch = "wasm32")))]
pub(crate) mod avif_decode;
pub(crate) mod bmp;
pub(crate) mod dds;
pub(crate) mod dds_bc;
pub(crate) mod deep_exr;
pub(crate) mod dicom;
pub(crate) mod dpx;
pub(crate) mod exr;
pub(crate) mod exr_cryptomatte;
pub(crate) mod fits;
pub(crate) mod gif_frames;
pub(crate) mod gif_palette;
pub(crate) mod heif;
pub(crate) mod iff;
pub(crate) mod jp2;
pub(crate) mod jpeg;
pub(crate) mod jpegls;
pub(crate) mod jxl;
pub(crate) mod pcx;
pub(crate) mod png;
pub(crate) mod pnm;
#[cfg(feature = "sgi")]
pub(crate) mod sgi;
#[cfg(feature = "sunraster")]
pub(crate) mod sunraster;
pub(crate) mod tga;
pub(crate) mod tiff;
pub(crate) mod tiff_exif;
pub(crate) mod tiff_ifd;
pub(crate) mod via_image;
pub(crate) mod vp8;
pub(crate) mod webp;
pub(crate) mod xpm;