Media: Targa/HDR stills keep their Exif orientation; DPX test accepts a stated transfer

#755 decoded stills of an extension-decided format with load_from_memory_with_format,
bypassing #827's oriented decode: load_oriented now takes the format.
The DPX ffmpeg oracle test expected the bare codec name; ffmpeg builds that write
the transfer characteristic make it "DPX 8-bit RGB, linear".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas
2026-10-12 03:45:49 -04:00
co-authored by Claude Opus 5.5
parent 42ef79a2fd
commit 6d4e721d2c
4 changed files with 13 additions and 9 deletions
+1 -4
View File
@@ -770,10 +770,7 @@ impl Inner {
{
return Err(MediaError::Decode(format!("{path}: {why}")));
}
let loaded = match crate::still_format(path, &bytes) {
Some(fmt) => image::load_from_memory_with_format(&bytes, fmt),
None => crate::probe::load_oriented(&bytes),
};
let loaded = crate::probe::load_oriented(&bytes, crate::still_format(path, &bytes));
let img = match loaded {
Ok(img) => img,
// A multi-layer OpenEXR file without an unnamed RGB layer: its colour layer.