473,327 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Graphics module

I wanted to make a script to build a thumbnail library. So I went to
cpan.org and find the various GD modules. So I run ppm3 (I am running
on XP) and search for GD. No luck. But cpan also lists Imager. That
ppm3 found so I installed it. So now I find that Imager, at least on
my system, doesn't do jpeg.

All I want to do is some little thumbnails, what do I do?

TIA.


--
Matt Silberstein

Do something today about the Darfur Genocide

http://www.beawitness.org
http://www.darfurgenocide.org
http://www.savedarfur.org

"Darfur: A Genocide We can Stop"
Nov 11 '05 #1
2 3367
On Fri, 11 Nov 2005 02:46:57 GMT
Matt Silberstein <Re**************************@ix.netcom.com> wrote:
All I want to do is some little thumbnails, what do I do?

I did it using 'Imagemagick' module.

usage example (cut'n'pasted from big scripture):

use Image::Magick;

[...]

sub gen_malgranda ($$) {
my $x = Image::Magick->new(size=>'160x160');
$x->Read('NULL:white');
my $p = Image::Magick->new;
$p->Read("$_[0]/$_[1]");
$p->Scale("160x160");
$x->Composite(image=>$p,gravity=>'center');
$x->Write("$_[0]/malgranda/$_[1]");
undef $p, $x;
}

[...]

mkdir "/home/user/store/jpeg/malgranda";
gen_malgranda("/home/user/store/jpeg","somefile.jpeg");

--
Best wishes,
~ Serge. pubkeys: http://uch.net/~fisher/keys.asc
~fingerprint : 4346 2766 BC96 E77F 5BFF 1E7C 12C2 3852 E5FD DC34

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFDdEH6X9BKv7kKDR0RAhCsAJ9ZYzqDh64WXbDtyqEX3j WQC1ZTQgCfYRsS
SmGRlP+cBfrbmXWXctcDYIA=
=8IOd
-----END PGP SIGNATURE-----

Nov 11 '05 #2
On Fri, 11 Nov 2005 09:02:10 +0200, in comp.lang.perl , "Serge A.
Ribalchenko" <I_***********************@uch.net> in
<20051111090210.48648737.I_*********************** @uch.net> wrote:
On Fri, 11 Nov 2005 02:46:57 GMT
Matt Silberstein <Re**************************@ix.netcom.com> wrote:
All I want to do is some little thumbnails, what do I do?

I did it using 'Imagemagick' module.

usage example (cut'n'pasted from big scripture):

use Image::Magick;

[...]

sub gen_malgranda ($$) {
my $x = Image::Magick->new(size=>'160x160');
$x->Read('NULL:white');
my $p = Image::Magick->new;
$p->Read("$_[0]/$_[1]");
$p->Scale("160x160");
$x->Composite(image=>$p,gravity=>'center');
$x->Write("$_[0]/malgranda/$_[1]");
undef $p, $x;
}

[...]

mkdir "/home/user/store/jpeg/malgranda";
gen_malgranda("/home/user/store/jpeg","somefile.jpeg");


Well, I did not even get to try this. I figured I would put this on
the Linux server it will end up on and that system had Imager great.
But that system did not have ConfigReader::Simple. So I figured I
would install that. Now I am all screwed up. Because
ConfigReader::Simple required something else, which required something
else. And I don't have root (a good thing for me) so I was doing a
local install of the modules. Well, that got messed up, so I tried to
back it out. Now I can't install anything.

I was following instructions here:
http://www.perl.com/pub/a/2002/04/10/mod_perl.html to do the install,
downloading from cpan.org. The stuff should have gone into my
/home/me/lib and /home/me/bin. I tried to clear those out (they only
had the stuff I had just added, this is a new hosting server for me).
Now I gather that the Perl makefile kind of things I have these
things, so it won't build a makefile, but I don't really. Any
suggestions?
TIA.

--
Matt Silberstein

Do something today about the Darfur Genocide

http://www.beawitness.org
http://www.darfurgenocide.org
http://www.savedarfur.org

"Darfur: A Genocide We can Stop"
Nov 11 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Brent W. Hughes | last post by:
If the Turtle gets himself into a large (or infinite) loop, is there any way to stop him other than Ctrl-Alt-Del? Brent
4
by: Steven Feil | last post by:
I am wondering if there is a light weight Python library for producing web graphics on-the-fly. There is a C-language library called gd that can be used in a CGI program to produce gif images. The...
5
by: Markus Elfring | last post by:
Hello, A lot of clipart libraries offer free raster images. I am looking for a similar collection for vector graphics. Do you know a gallery or archive for the following formats? - Scalable...
3
by: Anton81 | last post by:
Hi, I want to use globals that are immediately visible in all modules. My attempts to use "global" haven't worked. Suggestions? Anton
3
by: Harley | last post by:
I am trying to build graphic charts in a vb.net module callable from another form. I have translated this code from VB6 where it worked well. I can make the code work to bring up and display the...
7
by: Dick Moores | last post by:
I accidentally stumbled across the Turtle Graphics module (turtle.py) the other day and have been having some fun with it. Now I'm wondering if there is a way to build into a script the saving...
1
thatos
by: thatos | last post by:
Which website can I go to get grahics.py module
1
by: evilcraft_mj | last post by:
when i type from graphics import * error shown that there is no such module called graphics. help me find this......
2
by: Gabriel | last post by:
Hi all ! I'm developing a math program that shows graphics of functions. I would hear suggestions about the way of drawing 2D . Thanks a lot for your answers. - Gabriel -
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.