RetouchPRO

Go Back   RetouchPRO > Tools > Software > Photoshop Scripting

Notices

Photoshop Scripting Learning and sharing for all platforms

Reply
 
LinkBack Thread Tools
  #1  
Old 05-20-2004, 09:16 AM
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #2  
Old 05-20-2004, 01:21 PM
Doug Nelson's Avatar
Janitor
 
Join Date: Aug 2001
Posts: 3,907
Blog Entries: 20
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).
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #3  
Old 05-20-2004, 01:33 PM
Leah's Avatar
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...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #4  
Old 05-20-2004, 04:17 PM
Doug Nelson's Avatar
Janitor
 
Join Date: Aug 2001
Posts: 3,907
Blog Entries: 20
Is there nothing she doesn't know about?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
Reply

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 On
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 10:25 PM
Pixel - anyone have experience or comments on this editor? marxheadroom Software 2 07-06-2007 08:47 PM
NYTimes article: Looking Perfect, One Pixel at a Time mellyrose Photo Retouching 6 05-01-2007 07:24 AM
Copy pixel by pixel tobbe_81 Image Help 27 11-21-2006 08:53 AM
Larger image and take off noise, pixel dust, blur aquarius Image Help 1 09-25-2003 02:47 PM


All times are GMT -6. The time now is 12:09 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Copyright © 2008 Doug Nelson. All Rights Reserved




1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51