RetouchPRO

Go Back   RetouchPRO > Tools > Software > Photoshop Scripting
Register Blogs FAQ Site Nav Search Today's Posts Mark Forums Read


Photoshop Scripting Learning and sharing for all platforms

Getting Pixel Color In VB

Reply
 
Thread Tools
  #1  
Old 05-20-2004, 10:16 AM
dell8092 dell8092 is offline
Junior Member
 
Join Date: May 2004
Posts: 1
Angry Getting Pixel Color In VB

Could someone please tell me how to get the individual pixel color of a document in Photoshop using VB? I have tried it multiple ways and the only way I can truly get it is through the histogram. However, that is extremely slow!

Any help would be appreciated!

Thanks in advance,
Mike
Reply With Quote top
  #2  
Old 05-20-2004, 02:21 PM
Doug Nelson's Avatar
Doug Nelson Doug Nelson is offline
Janitor
 
Join Date: Aug 2001
Posts: 7,068
Blog Entries: 21
I can't find anything that simply reads the color, but there is ForegroundColor that can read the foreground color, and there are methods to read CMYK color values (but nothing for RGB).

So you could conceivably set the foreground color using whatever technique is appropriate, then read it and then reset the foreground to default (or you could even read what it is before, set it, read the setting, and restore what it was before).
Reply With Quote top
  #3  
Old 05-20-2004, 02:33 PM
Leah's Avatar
Leah Leah is offline
Senior Member
 
Join Date: Aug 2002
Location: London, UK
Posts: 518
I don't know anything about the Photoshop <-> VB interface, but in pure VB (at least up to VB6) there is a Point method Point (x, y) that will return the color of the specified pixel as a long integer. From that you can calculate the RGB values as follows:

r = color And &HFF&
g = (color And &HFF00&) \ &H100&
b = (color And &HFF0000) \ &H10000


Hope this may be of some use...
Reply With Quote top
  #4  
Old 05-20-2004, 05:17 PM
Doug Nelson's Avatar
Doug Nelson Doug Nelson is offline
Janitor
 
Join Date: Aug 2001
Posts: 7,068
Blog Entries: 21
Is there nothing she doesn't know about?
Reply With Quote top
Reply

  RetouchPRO > Tools > Software > Photoshop Scripting


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
REAL High End Skin retouching -Pixel Density Matching Technique Andy Bird Photo Retouching 20 08-21-2007 11:25 PM
Pixel - anyone have experience or comments on this editor? marxheadroom Software 2 07-06-2007 09:47 PM
NYTimes article: Looking Perfect, One Pixel at a Time mellyrose Photo Retouching 6 05-01-2007 08:24 AM
Copy pixel by pixel tobbe_81 Image Help 27 11-21-2006 09:53 AM
Larger image and take off noise, pixel dust, blur aquarius Image Help 1 09-25-2003 03:47 PM


All times are GMT -6. The time now is 11:43 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
Copyright © 2016 Doug Nelson. All Rights Reserved