summaryrefslogtreecommitdiff
path: root/notes
diff options
context:
space:
mode:
authoradamhrv <adam@ahprojects.com>2019-02-25 00:38:00 +0100
committeradamhrv <adam@ahprojects.com>2019-02-25 00:38:00 +0100
commitdb0c96b69c3d6186d73e33714f6dc692072dc987 (patch)
treedf6702470278b140a59f5877588c748eeeb209ed /notes
parent83acb900f3d444f38e3325741da798e5dd95eda5 (diff)
update
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