summaryrefslogtreecommitdiff
path: root/notes
diff options
context:
space:
mode:
authorAdam Harvey <adam@ahprojects.com>2019-02-25 17:49:11 +0100
committerAdam Harvey <adam@ahprojects.com>2019-02-25 17:49:11 +0100
commitc9f57046a45a9b4a234f38eacd0b825bc375c3f2 (patch)
treecd25fe695b9d1fa2549cfba41f3ba6d157e0ac00 /notes
parentb73485603adf0ec0deea74600fe9b8db6b495de8 (diff)
parent13d7a450affe8ea4f368a97ea2014faa17702a4c (diff)
lfw
Diffstat (limited to 'notes')
-rw-r--r--notes/utils/image_utils.md7
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