Skip to content

Commit f686d89

Browse files
committed
Update for new API proposal
1 parent 3a3f425 commit f686d89

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ pub mod pcx;
2121
/// Register all enabled extra formats with the image crate.
2222
pub fn register() {
2323
image::hooks::register_decoding_hook(
24-
image::ImageFormat::Pcx,
24+
"pcx".into(),
2525
Box::new(|r| Ok(Box::new(pcx::PCXDecoder::new(r)?))),
2626
);
27+
image::hooks::register_format_detection_hook("pcx".into(), &[0x0a, 0x0], Some(b"\xFF\xF8"));
2728
}

0 commit comments

Comments
 (0)