From 603dfac7bcf11116bf2f2d1f38ca5be35b76839e Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Fri, 21 Jul 2006 00:01:57 +0000 Subject: [PATCH] add a magic entry to detect XWD files --- image.c | 2 ++ t/t1000files.t | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/image.c b/image.c index 41a86724..04b287d9 100644 --- a/image.c +++ b/image.c @@ -2211,6 +2211,8 @@ i_test_format_probe(io_glue *data, int length) { include hotspot information */ FORMAT_ENTRY("\x00\x00\x01\x00", "ico"), /* Windows icon */ FORMAT_ENTRY("\x00\x00\x02\x00", "cur"), /* Windows cursor */ + FORMAT_ENTRY2("\x00\x00\x00\x00\x00\x00\x00\x07", + "xwd", " xxxx"), /* X Windows Dump */ }; unsigned int i; diff --git a/t/t1000files.t b/t/t1000files.t index 634721c2..da96ece7 100644 --- a/t/t1000files.t +++ b/t/t1000files.t @@ -5,7 +5,7 @@ use strict; use lib 't'; -use Test::More tests => 29; +use Test::More tests => 30; use Imager; Imager::init_log("testout/t1000files.log", 1); @@ -141,6 +141,13 @@ probe_ok(<