0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

画像サイズ変更に超便利な無料ツール: 「magick」

Last updated at Posted at 2025-09-07

画像サイズ変更「magick」

HTMLに埋め込む画像のファイルサイズが大きいと時間がかかる。目的に合わせて適切な画像サイズを設定することで、Webサイトのページ読み込み時間を短縮しアクセシビリティ向上ができる。

目的

画像のリサイズをPC上で行う無料ツール:ImageMagickについて、インストール手順と使用方法を説明する。

インストール手順

Windowsの場合サイトの下部のほうにある一番上の最新Versionの実行ファイルをダウンロードします。
image.png

画像サイズ変更

# 基本文法
magick 変更前ファイル名 -resize 横幅x縦幅 変更後ファイル名

# 例 (変更前と変更後のファイル名を同じにすることもできる)
magick plane.jpg -resize 480x600 plane.jpg

画像サイズ確認

# 基本文法
magick identify -format "%wx%h" ファイル名

# 例
magick identify -format "%wx%h" cat.png
>> 958x1011

アイコンファイルを作成する

1つの画像ファイル(.png.jpg)からアイコンファイル.icoを作成には次のようにします。

# 例 (「favicon.png」から複数サイズの画像を含むアイコンを「favicon.ico」として出力)
magick favicon.png -define icon:auto-resize=16,32,48,64,128,256 favicon.ico
0
1
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?