RmagickのImageListプロパティ一覧
詳細はこちら http://studio.imagemagick.org/RMagick/doc/imageattrs.html
使用しそうなやつ。
>> img = Magick::ImageList.new("public/images/rails.png") => [public/images/rails.png PNG 50x64 50x64+0+0 DirectClass 8-bit 6kb] scene=0 # 縦幅 >> img.columns => 50 # 横幅 >> img.rows => 64 # ファイルタイプ >> img.format => "PNG" # 縦幅 >> img.class_type => DirectClass=1 # 縦幅 >> img.depth => 8 # カラー総数 >> img.number_colors => 2018 # ファイルサイズ >> img.filesize => 6646 # 画像ファイル数 >> img.length => 1 # ファイルネーム >> img.filename => "public/images/rails.png" # イメージタイプ >> img.image_type => TrueColorMatteType=7 # Mine Type >> img.mime_type => "image/png" # クオリティ(JPEGのみ1~100) >> img.quality => 0 #おまけ # リサイズ(フィット) >> img.resize_to_fit(75, 75) => public/images/rails.png PNG 50x64=>59x75 59x75+0+0 DirectClass 8-bit 6kb # リサイズ(フル) >> img.resize_to_fill(75, 75) => public/images/rails.png PNG 50x64=>75x75 DirectClass 8-bit 6kb