[EMAIL PROTECTED] on wrote...
| Hi List,
|
| I'm creating a small script which will make use of the command line tool
| convert.exe and I have a few questions:
|
| ...
|
| 3. My script needs to place several images of the same size right on top
| of each other. The picture at the bottom is a .jpg, then there are
| multiple .png and the final image should exported as a .bmp. Originally I
| was making several calls to convert.exe and composite.exe and for each
| call I was saving to a temporary .png file. This took approx. 30
| seconds(!). I found out recently that I could do all the commands in one
| shot using the -composite switch of convert.exe. Instead of using 30
| seconds, it's now down to approx 3 seconds which seems more reasonable.
| This is what I have so far:
| "convert -size 1680x1050 xc:none bg.jpg -compose src-over -composite
| image1.png -composite image2.png -composite image3.png -composite
| image4.png -composite image5.png -composite newWallpaper.bmp"
|
First -compose src-over is the default.
Second you can use -flatten to compose multiply images more quickyly.
The Virtual canvas size of the first image can define the final size.
convert -background none -page 1680x1050 \
bg.jpg image1.png image2.png image3.png image4.png image5.png \
-flatten newWallpaper.bmp
See
http://imagemagick.org/Usage/layers/#flatten
| The resulting image seems to be somewhat corrupt and not all image
| viewer= s are capable of reading the file properly. I think it has
| something to do with the "-compose src-over" part. I don't really
| understand how this works and only arrived at using it by
| trial-and-error. Should it be used only once or together with each
| -composite? Is there a failsafe way to create the .BMP image?
|
There are a few different varients of the BMP image file format
try
bmp3:newWallpaper.bmp
see the rough notes at
http://imagemagick.org/Usage/formats/#bmp
for other varients of BMP
| 4. I understand from the examples that the command xc:none means there
| is no background colour. The command above seems to fail if I ommit
| xc:, doe= s it have to be there?
Only if you want to overlay images onto that background canvas.
It is not needed if all the images fit into the bg.jpg image.
You may need to add a -matte to ensure that image has a alpah channel
though.
The -flatten creates the background canvas with the current background
color automatically.
| 5. Is there anything else I can do to speed up these commands?
|
See above.
| P.S. For the record this is my first post...
|
We all have to start somewhere :-)
Your first post was clear, ordered and consise.
Wish more posts were like that.
Anthony Thyssen ( Graphics Enthusiast ) <[EMAIL PROTECTED]>
-----------------------------------------------------------------------------
A picture may be worth a thousand words,
but a thousand words use a lot less disk space!
-----------------------------------------------------------------------------
IM Examples http://www.imagemagick.org/Usage/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users