Imager-Album

 view release on metacpan or  search on metacpan

Album.pm  view on Meta::CPAN

				 'preview',
				 $imageno.".png");
  return $path;
}



# Find which images need to have previews
# updated and call update_preview on those.

sub update_previews {
  my $self    = shift;
  my %images  = %{$self->{'images'}};
  my @process = grep { !$images{$_}->{valid} } keys %images;
  my $imageno;
  my $c = 1;
  for $imageno (@process) {
    print "Updating preview $c/".@process."\n";
    $c++;
    $self->update_preview($imageno);
  }
}



# Update an images preview file

sub update_preview {
  my $self    = shift;
  my $imageno = shift;
  my %opts    = %{$self->{'preview_opts'}};

  my $image   = $self->{'images'}->{$imageno};
  my $file    = $image->{'path'};
  my $img     = Imager->new();

  if (!$img->read(file=>$file)) {
    print "ERROR $file: ".$img->errstr;

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.206 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )