Given some images (jpg or other supported formats) in input, you obtain a single PDF file with an image for every page.
This command takes a 1280x1024 p picture from the webcam. If prefer it smaller, try changing the -s parameter: qqvga is the tiniest, vga is 640x480, svga is 800x600 and so on. Get your smile on and press enter! :)
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
Setting: You have a lot of jpg files in a directory.
Maybe your public_html folder which is readable on the net because of Apache's mod_userdir. All those files from the current folder will be dropped into a file called gallery.html as image tags that can be viewed within a web browser locally or or over the Internet.
Original:
find . -iname "*.jpg" -exec echo "<img src=\"{}\">" >> gallery.html \;
Suppose you made a backup of your hard disk with dd: dd if=/dev/sda of=/mnt/disk/backup.img This command enables you to mount a partition from inside this image, so you can access your files directly. Substitute PARTITION=1 with the number of the partition you want to mount (returned from sfdisk -d yourfile.img). Show Sample Output
Instead of calculating the offset and providing an offset option to mount, let lomount do the job for you by just providing the partition number you would like to loop mount.
My take on the original: even though I like the other's use of -exec echo, sed just feels more natural. This should also be slightly easier to improve. I expanded this into a script as an exercise, which took about 35 minutes (had to look up some docs): http://bitbucket.org/kniht/nonsense/src/7c1b46488dfc/commandlinefu/quick_image_gallery.py
More compact and direct.
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.
This includes a title attribute so you can see the file name by hovering over an image. Also will hoover up any image format - jpg, gif and png.
Create transparent image to use as icon, watermark for other images, etc.
Display some text on the wallpaper especially warning messages
You can use the -format switch to get the size of the image. Replace "logo:" with your image. Show Sample Output
Regnerate Exif thumbnail.
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).
- Backup data before reszie as it over write original -To preserve aspect ratio remove !
EG: aspectRatio 1920 1200
For display a image in full screen it should be in any of the resolution obtained from the output. So resize an image to any of it and you can display it in full screen
For general aspect ratio :
aspectRatio () { for i in `seq 1 1000 `; do awk "BEGIN {print $1/$i, $2/$i}"; done |grep -v "\." |tail -1; }
Show Sample Output
http://manpages.ubuntu.com/manpages/hardy/man1/icotool.1.html There is also wrestool command. Show Sample Output
Quickly create a new image with a certain size and background color.
-i sets the source file -r sets the output frame rate, set it to the same frame rate as the input to output each frame -f sets the output format, trough it might be guessed by the extension
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....
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: