Any way to GET PIXEL COLOR from an Image?

  • Thread starter Thread starter mezzanine1974
  • Start date Start date
M

mezzanine1974

I have searched WEB already to find out a way to get pixel color from
an Image. It is possible in Visual Basic by Point method of Picture
and Form. But i cant find any method in Access VBA or in Excel VBA.
May be it is impossible?
 
Mezz,

I bought a utility a few days ago that does what your asking. It will allow
you to load a picture image or even a web page and pick a point anywhere on
the image and it will provide the color information in HEX, RGB, Visual
Basic, HTML and probably some other formats I'm not familiar with. I think
it was about $15. It's called Fast Color Codes. You should be able to find
it on Google, but if not, PM me and I'll send you the information.

Ken Warthen
(e-mail address removed)
 
The Access Image control is not the same as the VB PictureBox control, nor
is the Access Form the same object as a VB Form.

A couple of alternatives:

If the Image type is BMP then you could examine the Image data directly(via
the control's PictureData prop) to determine pixel color.
or
You could use the VBPictureBox class on my site.


If you try to use existing VB code it will not work directly with the Access
Image control. Access Image controls are lightweight int hat they do not
have/expose a permanent Device Context required by the Pixel related GDI
API's. You could use the Screen's DC as logn as you account for offsets for
the Access form and the Image control.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Back
Top