Imagemagick is a command line tool that you can use to manipulate images.
Create GIF animations from image sequences, resize images, screen captures and more.
Date Created:Friday December 29th, 2006 03:41 AM
Date Modified:Monday May 10th, 2010 06:47 PM
SCREEN CAPTURE
xwininfo this can be used to get information about a window you can get the target windows hexadecimal ID number which can be useful for a screen cap example:import -window import -window 0x2800011 screencap.miff display screencap.miff convert screencap.miff newpic.jpgInstead of using the hexidecimal ID of a window, use root to grab the whole desktop
import -window root all.miff
CAPTURE USING IMAGEMAGICK
x=1 while [ "$x" -le "$2" ] do import -window $1 "screencap$x.miff" # sleep 2s let x+=1 done
CONVERT USING IMAGEMAGICK
for x in `ls` do y=`echo $x | sed 's/miff/jpg/g'` convert $x $y rm $x done
PLAYBACK
animate -delay 20 *.jpg
CONVERT TO GIF
convert -delay 20 *.jpg capture.gifConvert a series of portable pixel maps (ppm) to png and then create an animated gif.
for x in `ls *ppm`;
do
convert $x ${x//.ppm}.png
done
convert -set delay 1 -colors 16 -dispose 1 -loop 0 -scale 50% *.png Output.gif
You can also use mpg.
ADD TEXT TO AN IMAGE
mogrify -fill red -pointsize 45 -draw 'text 100,200 "THIS IS COOL" ' *.jpg
MAKE NEW IMAGE AND RESIZE IT
montage -fill red -pointsize 45 -draw 'text 200,300 " THIS IS COOL" ' -geometry 320x240 cap1.jpg capture.jpg
CROPPING, APPENDING, COMPOSITING
convert -crop 75x53+0+53 $1 ${1//.png}-bot.png
convert -crop 75x53 $2 ${2//.png}-top.png
convert -append ${1//.png}-bot.png ${2//.png}-top.png ${1//.png}-user.png
convert -append top.png bottom.png half/c6-user.png
composite -compose multiply back-blue.png pngs/c6.png mult/c6-user.png
convert -crop 75x53 pngs/c7.png top.png
Downloads:
Download: xwininfo.txt 983 B
Please login or Click Here to register for downloads
Imagemagick by Dan Lynch
is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License
Based on a work at www.3daet.com
Permissions beyond the scope of this license may be available at http://www.3daet.com
