docs(geom): M14: qualify truncated TIFF errors

This commit is contained in:
Cédric Legrand committed 2026-11-14 17:55:18 +01:00
1 parent e40199bf6f
commit 3bf7a5dbbe
1 file changed
+2 -1
+2 -1
View File
@@ -65,7 +65,8 @@ const TIFF_COMPRESSIONS: [u16; 6] = [1, 4, 5, 8, 32946, 32773];
/// # Errors
///
/// Returns `Refusal::NotAPicture` for an unsupported format, `Refusal::Unsupported` for a TIFF
/// whose compression cannot be read or budgeted (including a truncated TIFF), `Refusal::TooLarge`
/// whose compression cannot be read or budgeted (including truncation that prevents reading
/// its compression metadata), `Refusal::TooLarge`
/// on size arithmetic overflow, and `Refusal::Broken` for an invalid header of another format.
pub fn probe(bytes: &[u8]) -> Result<Probe<'_>, Refusal> {
let format = image::guess_format(bytes).map_err(|_| Refusal::NotAPicture)?;