Without looking at it too closely it should work. I thought you were talking about altering a photograph or something like that.
Printable View
Without looking at it too closely it should work. I thought you were talking about altering a photograph or something like that.
BUMP
--------
I do, indeed, have ImageMagick, if that's of any use.
--------
I still need help. I know next-to-no PHP.
Sorry, thought that your problem was solved. I'm afraid I have told you about all I know about the GD aspect of php. I am hoping someone else who is more familiar with it can help out from here. Can you post a link to the image you are talking about so I can see what you are working with?
Out of curiosity what is the area of web design that you are most skilled at if it is not php?
Eh... http://www.seangillen.com/Untitled-1.gif :pQuote:
Can you post a link to the image you are talking about so I can see what you are working with?
Like, languages?Quote:
Out of curiosity what is the area of web design that you are most skilled at if it is not php?
I guess HTML; it's the only thing I've ever successfully written without using references or copy-and-pasting code... :)
bump.
lazy reply on my part, but try playing around with some of the scripts from my website. In it there is a page titled PHP -- Image Processing where I discuss what I have learned so far with GD. I am still expanding it and scanning for errors, but I think a lot of what you are looking for is listed there and there are a lot of sample scripts that you can try and adapt for your own purposes.
If you do find something useful there please post it here so others can see the solution as well. I am still learning, but I am about ready to start learning about some other aspects of PHP such as php.ini files or more on PCRE syntax.
EDIT: I had to sleep. Long day/night at work. Anyway, look at the following:
In your case the code would look something like the following since you are working with a gif image.Code:<?php
header('Content-type: image/jpeg');
$filename = 'http://www.animeviews.com/images/screenshots/cowboybebop27.JPG';
$im = imagecreatefromjpeg($filename);
imagetruecolortopalette($im, false, 255);
$ig = imagecolorat($im, 20, 20);
imagecolorset($im, $ig, 0, 0, 255);
imagejpeg($im, null, 100);
?>
Look at the other sample scripts too and let me know where you get stuck. I'll help if I can.Code:<?php
header('Content-type: image/gif');
$filename = 'http://www.seangillen.com/Untitled-1.gif';
$im = imagecreatefromgif($filename);
imagetruecolortopalette($im, false, 255);
$ig = imagecolorat($im, 0, 0);
imagecolorset($im, $ig, 0, 99, 0);
imagegif($im, null, 100);
?>