get screen shots
xwd is a command line utility for getting screen shots of windows on your Linux desktop. Do:
xwd -out shot.wd
Then click in the window you want a shot of
To get a screen shot of your desktop
xwd -root -out desktop.wd
Image Magick with open this type of file (display desktop.wd) but there
is another command line program for viewing these files: xwud
xwud -in desktop.wd
create thumbnails
This one liner will create thumbnail shots from the images you
have in a certain directory. You must have the 'netpbm' utilities installed.
First, create a directory called 'thumbnail'. Then issue this command:
for i in *.gif ; do giftopnm $i | pnmscale -xsize 40 - | ppmquant 128 \
- | ppmtogif - > thumbnail/$i ; done
If you're working with *.jpg images, change giftopnm and ppmtogif
to jpegtopnm and pnmtojpeg respectively.
author notice on photos
If you've taken some photos and you want to display them publicly,
you can put your name on them in some corner of them to show who
owns them. Using a part of the Image Magick suite called 'convert'
on the command line, this is done easily. You can even use your
favorite font.
convert -font somefont.ttf -fill red -pointsize 12 -draw \
'text 200,20 "Photo by Joe Smith"' image.jpg new_image.jpg
The Gimp
The Gimp is the most popular image manipulation program for Linux.
rounded corners with the gimp
If you want to round the corners of a rectangle, just follow these
instructions. This method works well for creating website buttons.
First, create an image with your desired background and create a rectangle in the center in your desired foreground color. I normally choose a dark blue for the
background and a dark red for the foreground.
Then apply a Gaussian blur (Filters --> Blur -- Gaussian blur) of about
20.
Then choose Image --> Colors --> Levels and enter levels of 120 1.20 and 130
respectively in the fields. You can change these values to suit you. Experiment
a bit until you get something you like.
You can then use the Image --> Colors --> Hue and Balance tool to
change the colors to your liking.
djvu
djvu is an image format, originally designed by AT&T, that aims at
providing the best quality images from scanned material (old books, documents).
At the same time, it produces a very small file size, which is ideal
for storage. You'll need the djvulibre package available
from: http://djvulibre.djvuzone.org/
djvu from jpg
After you've scanned a document and saved it in *.jpg format, simply
issue this command:
c44 file.jpg
one djvu from multiple documents
You can create one djvu file with multiple pages.
djvm -c big_file.djvu file*.djvu
This inserts pages in the order of the invididual file names. You
can also insert and delete pages:
djvm -i big_file.djvu contract.djvu 4
will insert the contents of contract.djvu at page 4
djvm -d big_file.djvu 4
will remove that same page
[ return to main tips page ]
|