Finds all corrupted jpeg files in current directory and its subdirectories. Displays the error or warning found.
The jpeginfo is part of the jpeginfo package in debian.
Should you wish to only get corrupted filenames, use cut to extract them :
find ./ -name *jpg -exec jpeginfo -c {} \; | grep -E "WARNING|ERROR" | cut -d " " -f 1
Show Sample Output
Please take notice that if you are going to use an JPG file for shadow effect, let change -background none to -background white! Because -background none make a transparent effect while JPG doesn't support transparent! And when viewing, you will get a bacl box! So we will use an white background under! We can use other color as well!
Most people take photos in landscape orientation (wider than it is tall). Sometimes though you turn the camera sideways to capture a narrow/tall subject. Assuming you then manually rotate those picture files 90 degrees for proper viewing on screen or photo frame, you now have a mix of orientations in your photos directory.
This command will print out the names of all the photos in the current directory whose vertical resolution is larger than its horizontal resolution (i.e. portrait orientation). You can then take that list of files and deal with them however you need to, like re-rotating back to landscape for consistent printing with all the others.
This command requires the "identify" command from the ImageMagick command-line image manipulation suite. Sample output from identify:
identify PICT2821.JPG
PICT2821.JPG JPEG 1536x2048 1536x2048+0+0 8-bit DirectClass 688KB 0.016u 0:00.006
Show Sample Output
Simple use of ImageMagick identify function. Show Sample Output
rotate: the rotate angle
width, $height: width and height to scale to
birghtness: change brighness
Useful to test programs and webpages. Show Sample Output
If you skip this part:
-density 300x300
you'll get a very lo-res image.
Assumes you've downloaded Toni Corvera's vcs script (http://p.outlyer.net/vcs), have it in your PATH, and have installed the script's dependencies. Generates a video contact sheet of 24 thumbnails and 3 thumbnails per column. The bold font and white-on-black color scheme keeps the text readable at the chosen 70% JPEG compression quality, which keeps the file size at a manageable level. You can go even lower with the quality and get a good looking result.
This command requires the imagemagick libraries and will resize all files with the .jpg extension to a width of 1024 pixels and will keep the same proportions as the original image.
Extract a color palette from a image useful for designers.
Example usage:
extract-palette myawesomeimage.jpg 4
Where the first argument is the image you want to extract a palette from. The second argument is the number of colors you want.
It may be the case where you want to change the search space. In that case, change the -resize argument to a bigger or smaller result. See the ImageMagick documentation for the -resize argument.
Show Sample Output
Find all corrupted jpeg in the current directory, find a file with the same name in a source directory hierarchy and copy it over the corrupted jpeg file. Convenient to run on a large bunch of jpeg files copied from an unsure medium. Needs the jpeginfo tool, found in the jpeginfo package (on debian at least).
Resizes all images in the curent directory to x resolution. It is better than `mogrify -resize *.jpg` because of independence from extension of image (e.g. .jpg and .JPG) (: Show Sample Output
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. Show Sample Output
This checks jpeg data and metadata, should be grepped as needed, maybe a -B1 Warning for the first, and a -E "WARNING|ERROR" for the second part....
List images between 800 and 16384 pixels wide that can be displayed sized and trimmed on a widescreen display. Requires the "wallpaper" utility. Show Sample Output
Checks if the aspect ratio is approximately 1.6 (16:10) or ~1.77777778 (16:9). Requires mpv_identify from mpv project https://github.com/mpv-player/mpv/blob/master/TOOLS/mpv_identify.sh (this replaces mplayer -identify, or midentify) Show Sample Output
Converts all the png files in a directory to a bunch of gifs - changing only the file extension. Converts them in parallel - simply change the '4' to match the number of CPUs you have, or the number you want to dedicate to the conversion process.
raw image created by canon digital camera. Install using apt-get install ufraw
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: