GD imagerectangle() function - background transparency?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Just wondering, if I load an existing image into an image resource, and then draw a rectangle on it using the GD imagerectangle() function, and specifically not using the imagefilledrectangle() function, does the new rectangle/box overlay the existing image content, or just draw the outlines thereof onto/overlaying the existing content?

Alternatively, should I load the existing image, then use something like imagecreatetruecolor() to create another image resource of the same dimensions, fill it with an obscure colour, draw the rectangle on it, set the transparency colour for that specific image resource to the obscure colour, and then copy it over the original/existing image resource before outputting/returning the combination?

TIA

Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'

[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux