This very cool technology. It allows you to edit drawings and pictures using command line.
Create an sh document to execute the commands. With in the document treat each command like a layer. If you know you need a black circle on top of a red one. You have to draw the red circle first.
To begin an image magick command:
convert
-scale % changes the size of the pic you’re working wih
-compress JPG will compress the file
-quality # changes the quality
To select a color for an object:
-fill red this lets the computer known anything drawn after this is red.
To creat a circle and add it to the image use:
-draw ‘circle 0x,0y 1x,1y’ The first set of coordinates is the center of the circle, while the last set of coordinates is an end point.
The following line of code takes the image copy.jpg
- scales it by 50%
- compresses the jpg file
- changes the quality to 85
- draws a white circle
- saves the file as copy-sm.jpg
convert -scale 50% -compress JPEG -quality 85 -fill white -draw ‘circle 100,100 130,130′ copy.jpg copy-sm.jpg
Working with command line while at first intimidating is a simple and practical means to interact with the computer.
Basic Commands to get you started. follow each command by hitting enter
pwd - tells you where you are in the computer
ls - will list the files wherever you are. For example if you’re on the desktop ls will show each folder on the desktop.
ls -la - will give a detailed list of the files in the current directory
cd directory name here - changes the directory. now’s a good time to hit pwd you’ll see you’ll see you’re in a new directory
cd .. - returns you to the previous directory
mkdir - creates a new folder in the current directory
rmdir - will delete files only if they are empty.
rm -rf - Will force delet if a folder contains other materials
control c - will stop a function
control z - will send it to the background
fg - brings the afore mentioned back to the fore ground
nano - brings up a text editor. This is great if you want to create a series of commands for something like Image magick
cat - outputs the contents of a file
“>” - replaces data into a document
“>>” - adds data to the end of the document
If you use the ls -la function you notice a string of letters interrupted by dashes to the left of each file. These letters indicates the privalages for the individual user, the group, and the owner.
W means someting is writable.
R means it is readable.
X means it is executable.
Using chmod and a series of 4 numbers you can change the privelags for the file.
“The first digit selects
the set user ID (4) and set group ID (2) and sticky (1) attributes. The second digit selects permissions for the user who owns the file: read (4), write (2), and execute (1); the third
selects permissions for other users in the file’s group, with the same values; and the fourth for other users not in the file’s group, with the same values. (man chmod)”

I just installed my first lighttpd server, and it works fine. Now I’d like to set it up to compress output (gzip), and include appropriate cache headers (expires, last modified, and revalidate).
Magnificient, that was easy. Just edited the conf file:
nano /etc/lighttpd/lighttpd.conf
uncomment this:
"mod_compress",
and this:
"mod_expire",
these:
compress.cache-dir = "/var/tmp/lighttpd/cache/compress/"
compress.filetype = ("text/plain", "text/html")
then create the cache directory and give www-data ownership:
mkdir /var/tmp/lighttpd/cache/compress/
chown -R www-data /var/tmp/lighttpd
That rocks that the compression is cached, saves a good amount of processing power I’m sure. I actually implemented something similar for the Wordpress cache plugin I made, which uses PEAR’s Cache_Lite.
Adobe Acrobat Professional has optical character recognition (OCR) capabilities! That rocks. I’ve used it on this late coupon for shipping at Staples:
(Clicking on image will load PDF, where you can see the results of Adobe’s OCR.)
Latest Comments
RSS