Skip to content

Instantly share code, notes, and snippets.

@kjunichi
Last active June 21, 2018 00:55
Show Gist options
  • Save kjunichi/7352023 to your computer and use it in GitHub Desktop.
Save kjunichi/7352023 to your computer and use it in GitHub Desktop.

cropのなぞ

JPEGでOrientation=1だと、rotate後はGravityがCenter。 PNGだとcenterではないが、North leftでも無さそう

JPEGでかつ、Orientation=1ならrotationしてCropしてscaleしてCropなら意図した動きになる。

identify tmp.jpg
tmp.jpg JPEG 512x512 512x512+0+0 8-bit sRGB 102KB 0.000u 0:00.000
macmini2014:mruby junichi$ identify tmp.png
tmp.png PNG 512x512 512x683+0+85 8-bit sRGB 410KB 0.000u 0:00.000

+repage

Image#page(Geometry)

blobだと色調が微妙に異なる?!

元がjpgでpngでwriteしたのとblobでjpgのまま書き出したイメージと比べると色調が異なる感じがする

Magick++固有の問題かどうかの切り分けもまだだけど。。

=> DropBoxのiOSクライアントのビュアーの問題かも

JPEGの高速サムネイル化

Magick++以外はsetOptionなどのメソッドや関数でjpeg:sizeオプションを指定することで 高速に処理されるとのことだった。

Image image; 
image.size( "640x480") 
image.magick( "JPEG" ); 

Magick++ -defineを実装するには

Image#defineValue("jpeg","size","100x100")

Link

ダミー画像の生成

Link

複数の画像ファイルをまとめるには?

montage -tile 2x1 -geometry 640x480  左画像  右画像  出力画像

復習

display

画像を表示する

convert

-delayオプションで動画が作れる

サポートしているフォーマットの一覧

convert -list format

画像の差分

WebCamで定点観測した結果を利用すると面白い

Link

Link

関連投稿

関連記事

関連

アクセス解析タグ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment