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?

More than 3 years have passed since last update.

メモ:画像ファイルのサイズを増やす

Last updated at Posted at 2021-03-18
  1. 画像ファイルを用意

    正確なファイルサイズにしたければ、小さいサイズの画像を用意するとか、
    1MB、みたいなきっちりサイズの画像を用意するとか。

    IMGE_FILE=/path/to/image_filename
    
  2. 希望サイズのメタデータを作成

    SIZE=101 # 101MBのサイズにしたい
    dd if=/dev/zero of=${SIZE}MB.file bs=$(expr 1024 \* 1024) count=${SIZE}
    
  3. 元画像のサイズup

    exiftool ${IMGE_FILE} -comment\<=${SIZE}MB.file
    
  4. 確認

    ls -lh ${IMGE_FILE}
    
  5. 後始末

    rm ${SIZE}MB.file
    
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?