Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Image modules not returning or accepting GD::Image

by Discipulus (Canon)
on Dec 02, 2022 at 07:59 UTC ( [id://11148490]=note: print w/replies, xml ) Need Help??


in reply to Image modules not returning or accepting GD::Image

Hello Bod,

probably his Anonymousness here above is correct, I was trying to decrypt the same part of code.. incidentally PDF-API2-2.044/source/t/gd.t runs fine on your box?

About the tiler, I think your best option is to use GD directly for this: allocate a new image Hx1 Wx3 then copy img1 to 0,0 then img2 to 0,0+W and img3 to 0,0+Wx2 (if I remember parameter positions correctly).

If you feel brave you can also use CopyResized from GD: so you can avoid also the Image::Resize dependency. Allocate the new empty image as needed and use CopyResized to fill in the three parts.

I'd try this part of code separately before implementing it in your code: you'll have fun on this :)

If it is possible avoid CGI stuff while presenting example code to run, not for the CGI per se but it is unrelated to the problem and I'd have to heavily modify your code if I'd want to run it on my own.

L*

PS gd_tiler using GD to create tiled images

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^2: Image modules not returning or accepting GD::Image
by Bod (Parson) on Dec 03, 2022 at 01:04 UTC
    incidentally PDF-API2-2.044/source/t/gd.t runs fine on your box?

    I didn't recall any errors or warnings during installation but it was a while ago. So I have just upgraded from 2.043 to 2.044 and there were no errors or warnings

    If you feel brave you can also use CopyResized from GD

    I remember using CopyResized. The resizing worked IIRC but it messed up the colour palettes. A trip down memory lane in this thread - GD colorAllocate not changing colour

      > The resizing worked IIRC but it messed up the colour palettes

      Did you tryed: GD::Image->trueColor(1); before creating new images?

      L*

      There are no rules, there are no thumbs..
      Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11148490]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2024-04-24 21:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found