0

Good day! When you run this script:

#!/usr/bin/perl
use strict;
use warnings;

use Image::EXIF;
my $exif = new Image::EXIF($ARGV[0] || 'image3.jpg');

displayed a warning (a warning is not at all the pictures.):

(null): unknown TIFF field type; discarding (Unknown)

Is it possible to suppress this warning?

drlexa
  • 197
  • 2
  • 11

1 Answers1

1

Looking at the source code of that module, it has a XS native part, and the c function that is called looks like this (at file "exifutil.c"):

void exifwarn2(const char *msg1, const char *msg2)
{
    fprintf(stderr, "%s: %s (%s)\n", progname, msg1, msg2);
}

As you can see, it prints to STDERR, so you can handle STDERR properly before the call to the Image::EXIF constructor. This SO question may helps you.

Community
  • 1
  • 1
Miguel Prz
  • 13,718
  • 29
  • 42