Re: GD imagerectangle() function - background transparency?

From: Date: Fri, 06 Sep 2013 05:59:02 +0000
Subject: Re: GD imagerectangle() function - background transparency?
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-31166@lists.php.net to get a copy of this message
hi! On Thu, Sep 5, 2013 at 10:35 PM, Jacob Kruger <jacob@blindza.co.za> wrote: > 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? imagecopy supports alpha, imageoverlay lets you define the mode. But I'm not sure what kind of results you try to achieve, please put a link to an example result image with the two source images, it could help :) -- Pierre @pierrejoye | http://www.libgd.org

« previous php.windows (#31166) next »