Has anyone in here used the GD module on Windows?

B

Bigus

Hi

This is not really a Perl question.. that is, I managed to (finally) find a
Perl 5.8 version of GD that you can install using PPM, and I can create
graphs where the output is straight to the web browser and it works very
nicely :)

However, I want to write the image to a file (pref jpg but png would do if
it's easier). The GD manual (http://www.boutell.com/gd/manual2.0.15.html)
gives links to 2 sites for the PNG libraries and 1 for jpg. However, as far
as I can see, all of the downloads require compiling and I haven't any
experience at all with C Programming. I found one section of supposed
binaries (for zlib IIRC) but the instructions still mentioned something
about including some .h file and didn't tell you what you were supposed to
do with the other files.

Is there a convenient installer anywhere that will just install all the
necessary files to give GD the support it needs to creates image files?

Thanks
Bigus
 
L

Lambik69

Ian.H said:
On Fri, 26 Sep 2003 12:40:22 +0100, Bigus wrote:

I didn't have a problem. I used PPM to 'install GD' and everything was
installed for me.. no extra libraries required etc.

oh...I get:

C:\WINDOWS>ppm install GD
Error: PPD for 'GD.ppd' could not be found.
C:\WINDOWS>

On 5.6 however it works fine.

Regards,

Ian

--
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Programming, Web design, development & hosting.
 
B

Bigus

Ian.H said:
Bigus,

I didn't have a problem. I used PPM to 'install GD' and everything was
installed for me.. no extra libraries required etc.

<URL:http://tk.digiserv.net/webana/>

has a link at the bottom where you can download that script if you desire
for an example of some Perl->GD code. The image produced is a PNG file,
but this could be replaced with a jpeg call rather than png.

The script was actually developed on windoze (2k) but will happily run on
both windoze and Unix with no mods required. Feel free to use the code for
whatever to help you out if it's of any use =)

Hi Ian

Thanks for that.. I must confess that PNG generation does actually work. I
was trying to create jpg's and it comes up with:

Can't locate object method "jpg" via package "GD::Image"

in the Apache error log. I didn't actually try PNG because I assumed that
since the boutell.com instructions mentioned installing supporting libraries
for PNG and JPG, and JPG wasn't working, that neither would PNG. It does,
which I guess will do.. I'd still prefer jpgs though, since browser support
is supposed to be better.

Regards

Bigus
 
B

Bigus

Lambik69 said:
oh...I get:

C:\WINDOWS>ppm install GD
Error: PPD for 'GD.ppd' could not be found.
C:\WINDOWS>

On 5.6 however it works fine.

Yeah, on 5.8 I found a repository with some updated modules. At the ppm>
command prompt you type:

rep add winnipeg http://theoryx5.uwinnipeg.ca/ppms

Then, "search GD" will reveal ver 2.07 of GD :)

Bigus
 
B

Bob Walton

Bigus said:
....
Thanks for that.. I must confess that PNG generation does actually work. I
was trying to create jpg's and it comes up with:

Can't locate object method "jpg" via package "GD::Image"


Try using the jpeg method. It might work better, since it actually
exists [tested under AS build 806 on Windoze 98SE and GD version 2.07].
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top