URI-Title

 view release on metacpan or  search on metacpan

lib/URI/Title/Image.pm  view on Meta::CPAN

  $type =~ s!^x-!!;
  my $title = "";
  my $x = 0;
  my $y = 0;
  if ( $type =~ /png/ ) {
    ($x, $y, $title) = pnginfo(\$data);
  }
  else {
    ($x, $y) = imgsize(\$data);
  }
  $title ||= ( split m{/}, $url )[-1];
  return $x && $y
    ? "$title ($type ${x}x${y})"
    : "$title ($type)";
}

1;

__END__

=for Pod::Coverage::TrustPod types title pnginfo



( run in 0.550 second using v1.01-cache-2.11-cpan-71847e10f99 )