PHP GD -> get color -> print color

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
morplug
Forum Newbie
Posts: 1
Joined: Mon Sep 12, 2011 8:17 am

PHP GD -> get color -> print color

Post by morplug »

Hello everyone!

I need a little help to get functions names from the GD library.
first i want to say i have a little knowledge with GD library like create image with words and etc.

So , what i'm trying to do is to take image and than
take the color of the first pixel on the top left than do some function work and than
set this pixel on the top left to another color.

now , i know how the algorithm should look like , i just don't know what function i need to use to:
take specific pixel color from the image
set new color for pixel on specific place

i'll be glad if you could help me with that ,
regards , Mor.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: PHP GD -> get color -> print color

Post by Weirdan »

imagecolorat(), imagesetpixel()
Post Reply