commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Batch resize all images to a width of 'X' pixels while maintaing the aspect ratio.
This makes uses of ImageMagick to make life easier.
Outputs the number of different pixels.
2 params to increase tolerance:
* thumbnails size
* fuzz, the color distance tolerance
See http://en.positon.org/post/Compare-/-diff-between-two-images for more details.
Compose 2 images (foreground.jpg with background.jpg) into 1 (image.jpg), the numeric parameters stablish the size of the foreground.jpg image (96x96) and the position x,y (+250+70) relative to the background.jpg image.
Images can be any format, jpg, png, bmp, etc...
Digital cameras embed EXIF data into the images they create indicating which orientation the photo was taken in. Some viewers and editors are smart enough to read this, but many are not (and web browsers ignore it). jhead is one of not many tools available that can losslessly rotate jpeg images. This command reads the EXIF orientation of each image, and rotates it if necessary.
If your version of curl does not support the --compressed option, use
curl -s http://funnyjunk.com | gunzip
curl -s --compressed http://funnyjunk.com
So you are in directory with loads of pictures laying around and you need to quickly scan through them all
-d Draw the filename at the top-left of the image
-D 1 - delay 1 second between changing slides
This command will show images in subdirectories as well.