LoginSignup
4
4

More than 5 years have passed since last update.

PerlのImageMagickでのフォーマットなどの取得

Posted at

PerlのImageMagickでの値の取得。

perl
my $image = Image::Magick->new;
$image->Read("$filename");
my ($width, $height, $format, $depth, $filesize, $colorspace) = $image->Get('width', 'height', 'magick', 'depth', 'filesize', 'colorspace');

通常、formatは「format attribute」で取るが、返ってくる値が「Joint Photographic Experts Group JFIF format」とかなので、使いにくい。

「magick」アトリビュートを使用。

あと、depthが深いとAndroidで使えないことがあるのでチェック。

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4