Scripting – how can I find the brighest RGB value of an image

L
Posted By
Larry
Jul 16, 2004
Views
769
Replies
4
Status
Closed
Hello group

I am looking for any solution that will tell me what the RGB value of the brightest pixel inside an image is.

I thought I could achieve this with applescript, but it looks like applescript will have have to sample every single pixel and do some heavy number crunching to work it out.

Any leads on how I can achieve this?

Master Retouching Hair

Learn how to rescue details, remove flyaways, add volume, and enhance the definition of hair in any photo. We break down every tool and technique in Photoshop to get picture-perfect hair, every time.

NE
no_email
Jul 16, 2004
On 16 Jul 2004 19:05:50 +0800, Bob Whatsima wrote:

Hello group

I am looking for any solution that will tell me what the RGB value of the brightest pixel inside an image is.

I thought I could achieve this with applescript, but it looks like applescript will have have to sample every single pixel and do some heavy number crunching to work it out.

Any leads on how I can achieve this?
Not sure if this would help at all…. Ever try threshold on a dup layer until the pixels are but a scant few then use as a color select? te number crunch would be much smaller if at all possible.
O
Odysseus
Jul 17, 2004
In article <20040716190550676+>,
Bob Whatsima wrote:

I am looking for any solution that will tell me what the RGB value of the brightest pixel inside an image is.

I thought I could achieve this with applescript, but it looks like applescript will have have to sample every single pixel and do some heavy number crunching to work it out.

Any leads on how I can achieve this?

I’ve never tried anything like this, so this is sheer speculation — but is there any way AppleScript can get at the Histogram function? If so, it might be able to ‘walk’ through the levels from 255 downward, and report the first non-zero pixel count it finds.


Odysseus
PW
Pjotr Wedersteers
Jul 17, 2004
ZONED! wrote:
On 16 Jul 2004 19:05:50 +0800, Bob Whatsima wrote:

Hello group

I am looking for any solution that will tell me what the RGB value of the brightest pixel inside an image is.

I thought I could achieve this with applescript, but it looks like applescript will have have to sample every single pixel and do some heavy number crunching to work it out.

Any leads on how I can achieve this?
Not sure if this would help at all…. Ever try threshold on a dup layer until the pixels are but a scant few then use as a color select? te number crunch would be much smaller if at all possible.

Yep, this works like a charm, and also to find the darkest bits. If you shift click on the lightest & darkest bits in this way and then cancel the Treshold tool you can fire up curves or levels and use the black and white eyedroppers to easily mark the blackpooint and whitepoint. An easy way to enhance many a photo that uses less than the entire brightness spectrum available!
Pjotr
BW
Bob Whatsima
Jul 19, 2004
My newsreader went on the blink, but thanks for the answers. Yes I was able to get a histogram dump after much trial and error. Merci for suggestions ZONED, Pjotr and Odysseus.

Must-have mockup pack for every graphic designer 🔥🔥🔥

Easy-to-use drag-n-drop Photoshop scene creator with more than 2800 items.

Related Discussion Topics

Nice and short text about related topics in discussion sections