|
Posted by woddy on November 29, 2004, 12:14 pm
Please log in for more thread options
Hi to all
I have a problem.
When I make thumbnails with the code below it re-sizes images
to scale, the only problem is, some of the images are less than
75x53px so when I display them at 75px wide, they look out of shape.
There is a way out of this problem, that is, when a thumbnail is made
it
composes it over a transparent 75x53border.gif, this is in my
(auction-images)
path = home/??????/??????/auction-images/75x53border.jpg
all I need now is to have the code below changed so it adds the
transparent 75x53border.gif
thus making a finished fixed size thumbnail image with a transparant
border,
Have you any ideas how I can do this?
Many thanks for any help!
Best Regards
Woddy
{
my ($q, $x);
$q= Image::Magick->new;
$x= $q->Read("$config/temp/$new_thumb_name");
warn "$x" if "$x";
$x = $q->Resize(geometry=>'75x53');
warn "$x" if "$x";
$x=$q->Write("$config/$new_thumb_name");
}
--
woddy
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------
|
|
Posted by Andy Harrison on November 29, 2004, 4:05 pm
Please log in for more thread options
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
On Mon, 29 Nov 2004 11:14:18 -0600, woddy wrote
Subject: "Image Magick code help"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> When I make thumbnails with the code below it re-sizes images
> to scale, the only problem is, some of the images are less than
> 75x53px so when I display them at 75px wide, they look out of shape.
Give this snippet a try.
http://perlmonks.org/?node_id=53402
--
Andy
|
| Similar Threads | Posted | | Image Magick code help | December 3, 2004, 6:43 pm |
| image magick through apt-get | November 27, 2004, 5:48 pm |
| Image magick palette | July 30, 2004, 9:16 pm |
| Image::Magick newbie | September 5, 2005, 10:19 pm |
| Errror in mod Image::magick or something else? | October 29, 2005, 4:53 am |
| ANNOUNCE: Image::Magick::Tiler V 1.00 | February 22, 2005, 11:35 am |
| ANNOUNCE: Image::Magick::Chart V 1.01 | June 13, 2005, 3:36 am |
| Image::Magick scalar value to print use CGI | April 13, 2006, 10:09 pm |
| Problems Installing Image::Magick | September 26, 2006, 3:35 pm |
| Reduce colors with Image::Magick | July 6, 2007, 7:06 am |
|