Hi Ben,

I think you need to clarify this.  An image is composed of all kinds of 
data, depending on the type of image it is.  Things like header 
information, version #, color palettes, and other info related to the image 
but not actually part of the image itself are included in the binary file 
along with the image data itself.  You can't just "convert" the image 
portion of an image file to hex without knowing something about the 
internal layout of the binary data.

I assume what you mean here is if you have an image all of one color you'd 
like to get the hex code for that color.  So, as I said above, it's not so 
easy as just going in and picking a pixel and getting its color.  You have 
to know something about the image format's image representation.

Otherwise, I suspect that the GD library may have a function to get the 
color of a particular pixel whose location (x,y) you specify, though I 
don't know the function's name off-hand.  You might want to look thru the 
GD documentation.

At 04:09 PM 4/17/01 +0100, you wrote:
>I need to open an image and convert its binary type to hex,
>
>what I need to do is a bin2hex on the binary info of the image, sounds simple
>enough. Although, I can get php to open the image and read the (binary)
>contents into a string, can someone help me.
>
>Thanks.

            -=- Mike Flynn - Burlington, VT -=-
[EMAIL PROTECTED]  http://www.mikeflynn.net/  * Give blood *
  Born to see two thousand years
  Of man's effect upon the planet          [Killing Joke]
  Extinction seems to be a plausible risk


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to