Bluehost.com Web Hosting $6.95

Image Question

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 ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-25-2003
Craig Keightley
 
Posts: n/a
Default Image Question

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




Reply With Quote
  #2 (permalink)  
Old 09-25-2003
Andy Hassall
 
Posts: n/a
Default Re: Image Question

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)
Reply With Quote
  #3 (permalink)  
Old 09-25-2003
Tom H
 
Posts: n/a
Default Re: Image Question

"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
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 12:20 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0