GD library to extract colors and vector

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
Eric!
DevNet Resident
Posts: 1146
Joined: Sun Jun 14, 2009 3:13 pm

GD library to extract colors and vector

Post by Eric! »

I've never tried to do any graphics with PHP and I was wondering if this is impossible, hard or easy to do. I have a color coded gradient chart (GIF) that has a vector in the center. I need to detect the pixel color as well as the approximate angle of the vector (and it's color).

I've attached the image so you can see what I'm doing. The tiny vector is the blue line in the center and then the background color corresponds to it's magnitude. The vector will always be centered and I can use its color to determine which direction it is pointed.

thanks!
Attachments
Image to be analyzed
Image to be analyzed
xy-4f1f371433a27.gif (7.35 KiB) Viewed 810 times
Eric!
DevNet Resident
Posts: 1146
Joined: Sun Jun 14, 2009 3:13 pm

Re: GD library to extract colors and vector

Post by Eric! »

I'm gonna go with impossible. It seems GD is primarily for creating. I was hoping to find some handy correlation function or something.
Post Reply