resolve https://rt.cpan.org/Ticket/Display.html?id=7948
- i_writegif_low() wasn't setting the returned global palette, which
meant a rubbish palette was returned to the user (detected with valgrind)
+- built 0.43_02 for testing
0.43_03
but one step at a time)
- added bmp_compression_name, bmp_used_colors, bmp_filesize, bmp_bit_count
tags on reading a BMP file
+- added tools/imager to the distribution. This is still very
+ experimental and untested. Patches welcome, if you write tests to go
+ with them.
=================================================================
my $verbose;
my $backup; # backup extension name
my $directory; # output directory
+my $output;
my $type;
my %write_opts; # options supplied to write()
+my $understand;
my @collection; # actions/options in order to allow us to set values as needed
'type|t=s' => \$type, # output file type
'write-option|wo=s' => \%write_opts,
'output|o=s' => \$output,
+ 'understand' => \$understand,
@getoptions,
'help-color-spec' => sub { $help_func->("color specifications") },
+ 'help-actions' => sub { $help_func->("actions") },
+ 'help-options' => sub { $help_func->("processing options") },
+ 'help-general' => sub { $help_func->("general options") },
)
or usage();
$did_help and exit;
+unless ($understand) {
+ print STDERR <<EOS;
+This tool is under-tested and will probably destroy your data.
+
+If you understand and agree with this use the --understand option.
+
+In fact, only the --info and --tags actions have been used at all.
+EOS
+ die;
+}
+
exists $write_opts{file}
and die "Illegal write option 'file'\n";
exists $write_opts{type}
}
}
}
+ else {
+ print STDERR "Failed reading $name: ",$im->errstr,"\n";
+ }
}
sub _replace_codes {
$im;
}
+sub req_tags {
+ my ($im, $ignored, $state) = @_;
+
+ print $state->{filename},"\n";
+ my @tags = $im->tags;
+ for my $tag (sort { $a->[0] cmp $b->[0] } @tags) {
+ my $name = shift @$tag;
+ print " $name: @$tag\n";
+ }
+
+ return;
+}
+
sub val_scale {
my ($option, $value) = @_;
return
(
info => [ \&req_info ],
+ tags => [ \&req_tags ],
scale => [ \&req_scale, \&val_scale ],
rotate => [ \&req_rotate, \&val_rotate ],
caption => [ \&req_caption ],
imager [--font-size <size>] [--fs <size>] [--background <color>]
[--bg <color>] [--foreground <color>] [--fg <color]
[--info-format <format>] [--rotate <angle>] [--scale <scale-spec>]
- [--caption <text>] [--info] [--font fontfile] files ...
+ [--caption <text>] [--info] [--tags] [--font fontfile] files ...
imager --help-I<option>
- imager --help-I<operation>
+ imager --help-I<operation>
+ imager --help-options
+ imager --help-actions
+ imager --help-general
=head1 DESCRIPTION
No output image file is produced.
+=item --tags
+
+Displays all the tags the Imager reader for that format sets for each
+file.
+
+See L<Imager::Files> for file format specific tags and
+L<Imager::ImageTypes> for common tags.
+
=item --scale <scalefactor>
=item --scale <width>x<height>