We can now make gradangles at IM using the SRT operator at Image Magick. |
This code can be used for any angle. Just change the size, colors and angle number from 10 to 360. Reverse the colors and add a minus sign in front of the angles too. | |||||
<?php $OUT="WB140.gif"; exec ("/usr/bin/convert -size 50x50 gradient:white-black -distort SRT 140 $OUT"); ?> | |||||
| |||||
You can then put all the angles together into a Montage. You input all of your URLs at once. Tell the server how many columns and how many rows (just like a HTML table). You can use many images in a Montage. This is a small example of a 2x2 montage. -tile 2x2 says just that. -geometry +0+0 means there is no cellspacing between the images. | |||||
<?php $OUT="SRT/montage.gif"; exec ("/usr/bin/montage SRT/WB140.gif SRT/WB_140.gif SRT/BW_140.gif SRT/BW140.gif -tile 2X2 -geometry +0+0 $OUT"); ?> | |||||
You can even use a transparent background (or none) and you will get something like this (gif only). You can then make that transparent at IM or by command line. | |||||
png does not work as well with no color | |||||
You may find it easier, and more versatile to work with a script as opposed to the form. You can then do other things with it, such as resize and composite or distort, etc. Here is a SAMPLE SCRIPT and this is the IMAGE it produces. Grab the code and see what each individual exec command produces by putting the url in the link at the bottom of the script (outputs to a temp subdirectory). | |||||
View all the Angles in these files: Background Black Background White | |||||
I have two forms and a text file in a zip. One form makes the angles and writes the image to a subdirectory called grads....so you will need to make a subdirectory (or change it on the form to what you want). At the same time, for every angle you create with the form it writes the img url to a text file. This is so you can keep track of the angles, especially if you do them in a particular order for a montage afterwards. The other file is a form for the montage. You will need to enter the URLs in order of column by column. There can be no line breaks. Just a space inbetween URLs. So if you use the URLs that are written to the text file you will need to edit it by deleting all the hard breaks. I hope you find it useful. The URLs in the text file can then be deleted to use for another montage. | |||||
IM GRADANGLES ZIP | |||||
This is a text version of the Form if you prefer it to the zip. You will need to also create a blank text file called GradtableURL.txt | |||||
ANGLE FORM TXT MONTAGE FORM TXT © 2008 LingoLinda.com |