diff options
| -rw-r--r-- | notes/utils/image_utils.md | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/notes/utils/image_utils.md b/notes/utils/image_utils.md index 3ccc2e78..d8a466f9 100644 --- a/notes/utils/image_utils.md +++ b/notes/utils/image_utils.md @@ -112,6 +112,10 @@ Get the size of a PSD `convert website-design.psd -print "Size: %wx%h\n" /dev/null` +Convert all images to RGB + +`mogrify -resize 256x256! -colorspace sRGB -type truecolor /data_store_hdd/datasets/people/lfw/progan/faces_256_full/*.jpg` + ## Animate GIFs With ImageMagick @@ -185,10 +189,11 @@ convert -define jpeg:size=200x200 original.jpeg -thumbnail 100x100^ -gravity ce Resize all directories to square crops for Caffe ``` find . -name "*.jpg" -print0 | xargs -0 mogrify -resize 256x256^ -gravity Center -crop 256x256+0+0 +repage - ``` +Move all images in subdirectories to another directory: +`find . -name "*.jpg" -print0 | xargs -0 mv -t new_location/` Replace spaces in filenames |
