WeBWorK Main Forum

Use GD to modify an existing image?

Re: Use GD to modify an existing image?

by Stephen Corwin -
Number of replies: 0
Thanks, but let me clarify. What I'd like to do is to upload a PNG file, use GD::newFromPng() to make a new GD::Image object from that file, and then call various GD methods to modify the image before displaying it. I think that something like

$w = new WWPlot(342,154);
$image = $w->im()->newFromPng($path_to_png);


would make the object if I knew $path_to_png. Is this right? And what should I use for $path_to_png?

Thanks again,

Steve