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で使えないことがあるのでチェック。