Skip to content

Commit

Permalink
More debugging for auto probing of image types.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnar Mar Hrafnkelsson committed Aug 20, 2002
1 parent 84e5129 commit 27c373c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion image.c
Original file line number Diff line number Diff line change
Expand Up @@ -2189,7 +2189,15 @@ i_test_format_probe(io_glue *data, int length) {
}
}


if (match && !strcmp(match, "jpeg")) {
unsigned int x0, x1;
rc = data->readcb(data, head, 18);
if (rc == -1) return NULL;
x0 = (unsigned char)head[0];
x1 = (unsigned char)head[1];
data->seekcb(data, -rc, SEEK_CUR);
printf("Jpeg reread: %x %x\n", x0, x1);
}

if (!match &&
(rc == 18) &&
Expand Down
1 change: 1 addition & 0 deletions t/t50basicoo.t
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ for my $type (@types) {
if (ok($fh, "opening $opts{file}")) {
binmode $fh;
my $fhimg = Imager->new;
Imager::log_entry("Reading file: $opts{file}\n", -1);
my $fhrc = $fhimg->read(fh=>$fh, %mopts);
if (ok(!$fhrc, "check that type is required")) {
ok ($fhimg->errstr =~ /type parameter missing/, "check for no type error");
Expand Down

0 comments on commit 27c373c

Please sign in to comment.