I'm still experimenting with creating "spites" -- montages of images.
On recommendation of this list I've been trying to use Slice to add
padding between images, but I'm not getting transparency. I've tried
a number of options, w/o luck.
I keep ending up with something like this:
http://hank.org/splice.png
Which is generated with:
$p->Splice( width => 100, height => 0 );
my $m = $p->Montage(
mode => 'Concatenate',
tile => 'x1',
background => 'none',
);
$m->Write( 'PNG8:splice.png' );
That image is 13186 bytes.
Using a transparent border I get:
http://hank.org/border.png
Which is 13513 bytes using this:
my $m = $p->Montage(
mode => 'Concatenate',
tile => 'x1',
background => 'none',
border => 50,
bordercolor => 'none',
);
$m->Write( 'PNG8:border.png' );
1) Any recommendation on minimizing the final size?
(Again, I'm not that familiar with PerlMagick so specifics really
help.)
2) I'm trying to automate the process of building these "sprite"
files. I'm seeing significant extra file size if I add in one file
that is much different in size.
For example, those 16x16 icons are about 15k. If I use the process
above to create a file of just one image (1119 x 504) the resulting
file is about 48K.
Yet, if I combine the 1119 x 504 with all those 16x16 images the
resulting file is 75K. Does all that transparent area use up that
much space?
So, I may need to try and create multiple image files and group images
by like size. The point of the sprites is to reduce the number of
HTTP request, so don't want to create too many files.
BTW in the above, if I tile "1x" vertically the images are all left
aligned (at 50px due to the border). When I tile "x1" the images are
all *centered* vertically. Are the defaults for the two directions
different?
--
Bill Moseley
[EMAIL PROTECTED]
Sent from my iMutt
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users