Be a Supporter!

Changing site image colors

  • 129 Views
  • 4 Replies
New Topic Respond to this Topic
Roach
Roach
  • Member since: Mar. 23, 2003
  • Offline.
Forum Stats
Member
Level 07
Blank Slate
Changing site image colors 2004-07-22 16:20:27 Reply

Is there a way in photoshop to change just the color of a image leaving the fading, light to dark, and other things like that the same? The images I'm talking about are the kind that you would have as backgrounds of a site, or table images.

pieoncar
pieoncar
  • Member since: Apr. 21, 2004
  • Offline.
Forum Stats
Member
Level 53
Blank Slate
Response to Changing site image colors 2004-07-23 04:33:32 Reply

At 7/22/04 04:20 PM, Roach_ wrote: Is there a way in photoshop to change just the color of a image leaving the fading, light to dark, and other things like that the same? The images I'm talking about are the kind that you would have as backgrounds of a site, or table images.

Color balance (ctrl-B) or Hue/Saturation (ctrl-U) should do what you're looking for. Be sure to play with all the settings on either dialog.

lexus3
lexus3
  • Member since: Dec. 31, 2003
  • Offline.
Forum Stats
Member
Level 14
Blank Slate
Response to Changing site image colors 2004-07-23 08:58:45 Reply

ACtually I was wondering about something similar to that. You know those siites that require to verify a picture with an alphanumeric code or a random word in order to stop bots? How do they do that? That means they need to have a whole separate image each time.

bumcheekcity
bumcheekcity
  • Member since: Jan. 19, 2003
  • Offline.
Forum Stats
Member
Level 27
Blank Slate
Response to Changing site image colors 2004-07-23 09:04:20 Reply

At 7/23/04 08:58 AM, lexus_rx_1337 wrote: ACtually I was wondering about something similar to that. You know those siites that require to verify a picture with an alphanumeric code or a random word in order to stop bots? How do they do that? That means they need to have a whole separate image each time.

I'd have a database, with pictureurl, and code. The pictureurl would simply be the url to a hand-drawn picture in paint, that says XYvfd7 or whatever. code would be XYvfd7. Simple. Then SELECT code FROM blah WHERE pictureurl=whatever, and then verify 'code' against what they typerd in.

pieoncar
pieoncar
  • Member since: Apr. 21, 2004
  • Offline.
Forum Stats
Member
Level 53
Blank Slate
Response to Changing site image colors 2004-07-23 15:32:24 Reply

At 7/23/04 09:04 AM, bumcheekcity wrote:
At 7/23/04 08:58 AM, lexus_rx_1337 wrote: ACtually I was wondering about something similar to that. You know those siites that require to verify a picture with an alphanumeric code or a random word in order to stop bots? How do they do that? That means they need to have a whole separate image each time.
I'd have a database, with pictureurl, and code. The pictureurl would simply be the url to a hand-drawn picture in paint, that says XYvfd7 or whatever. code would be XYvfd7. Simple. Then SELECT code FROM blah WHERE pictureurl=whatever, and then verify 'code' against what they typerd in.

That's one way to do it... But not the best way :)

Remember, php.net is your friend :)

<?php
// haven't tested this, so it might not work... I'm recompiling PHP with
// the GD library right now.

$string = $_GET['text'];
$im = imagecreate(400, 60);
// allocate memory for an image 400 px wide, 60 px high

$background_color = imagecolorallocate($im, 255, 0, 0);
// make $im all red, stores the return value, but we don't need it right now

$text_color = imagecolorallocate($im, 0, 255, 0);
// this doesn't change the background color now, but it affects
// the next thing we put onto the image

imagestring($im, rand(1, 5), 0, 40, $string, $text_color);
// read the documentation on this one...
// you can fool the OCR programs by using different fonts, rotations, etc.

header("Content-type: image/jpg");
// wait till the end, in case there were any errors

imagejpeg($im);
// you could also do imagepng... make your headers appropriately

imagedestroy($im);
// frees the memory allocated to $im
die();

?>