This is a discussion on Image Question within the alt.comp.lang.php forums, part of the PHP Programming Forums category; At the moment, i am plying with the GD functions using Jpegs and the Image Resample function. I was wondering ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
At the moment, i am plying with the GD functions using Jpegs and the Image
Resample function. I was wondering if there is a way to add a second image over an existing image. I am working on a shopping cart system with thumbnail images and I want to do one of the following depending on which looks better: Create a "SOLD OUT" Image over the existing image Turn the image to a Black and White Picture Turn the image Black and White and cover the image with a sold out image/text Any help or suggestios would be grateful Craig |
|
|||
|
On Thu, 25 Sep 2003 09:58:31 +0100, "Craig Keightley" <craig@sitedesign.net>
wrote: >At the moment, i am plying with the GD functions using Jpegs and the Image >Resample function. >I was wondering if there is a way to add a second image over an existing >image. > >I am working on a shopping cart system with thumbnail images and I want to >do one of the following depending on which looks better: > >Create a "SOLD OUT" Image over the existing image http://uk2.php.net/manual/en/function.imagecopy.php >Turn the image to a Black and White Picture If a paletted image, http://uk2.php.net/manual/en/function.imagecolorset.php , using a standard RGB->greyscale conversion function (different weights for each primary colour - search Google, the formula for the weightings is on hundreds of sites). If truecolour, you'll probably have to loop over each pixel and http://uk2.php.net/manual/en/function.imagesetpixel.php them accordingly. (Depending how GD truecolour images work with regards to the allocated colours - not really worked with them much). >Turn the image Black and White and cover the image with a sold out >image/text Both above. -- Andy Hassall (andy@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk) Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space) |
|
|||
|
"Craig Keightley" <craig@sitedesign.net> wrote in message news:<3f72ae33$0$270$cc9e4d1f@news.dial.pipex.com> ...
> At the moment, i am plying with the GD functions using Jpegs and the Image > Resample function. > I was wondering if there is a way to add a second image over an existing > image. > > I am working on a shopping cart system with thumbnail images and I want to > do one of the following depending on which looks better: > > Create a "SOLD OUT" Image over the existing image > Turn the image to a Black and White Picture > Turn the image Black and White and cover the image with a sold out > image/text > > Any help or suggestios would be grateful > > Craig I think you need to look at the following. imagecreate your new image in black and white. imagecopyresized your thumbnail to this image. imagecopyresized your 'sold out' image to a portion of your imagecreated image. Maybe TOmH |