What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Histogam bug?


PutinHuilo

Well-Known Member
Messages
65
Likes
0
When i draw two square i see proper representation on hitogram
h1.jpg

When i draw same amount of pixels using circles, i see incorrect representation on historgram
h2.jpg

Is this a bug?

Also why "Source" under historgram is always grayed out?

I have PS 2020 v 12.2.12
 
The option is greyed out because you are on a background layer only, you only have one layer open in Ps. Add a new layer.
 
I get the same readings when I use "entire image" under source.
Guess its a bug in the PS what version you have?

I saved image with circle and looked at it in FastStone Image Viewer and it shows proper histogarm, unlike Photoshop.


The option is greyed out because you are on a background layer only, you only have one layer open in Ps. Add a new layer.
Thanks for clarification.
 
Thought I would add some things that I see in the histogram so you know to take it with a grain of salt. Summary first.

1) The histogram (for me) does not always instantly update and does not show the warning triangle that it is not updated all the time.
2) If you have a selection active, it is only measuring the pixels in the selection
3) The scale in the histogram is changed dynamically and the bars may be clipped at the top because the scale has changed (I believe to make the smaller bars be more visible. This particularly shows up when you have feathering or antii-aliasing which often shows up with non vertical /horizontal edges

For #3, here is an example

This first image shows just is two regions of gray and white pixel regions of just two tones. The Smart Object has a 2 pixel Guassian blur yet it is turned off for this example.

Total Pixel Count = 1,500,000
White Pixel Count = 270,760 18.05%
Mid Gray Pixel Count - 1,229,240 81.95%

Note that the histogram shows the ~18% white and 82% gray properly:

Screen Shot 2022-02-01 at 12.49.28 PM.jpg

However, If I introduce a 2 pixel Guassian blur it blends a few of the gray to white border areas to la gradient of lighter grays between the two more solid colors.

Total Pixel Count = 1,500,000
White Pixel Count = 264,550 18.05%

Black Pixel Count - 1,229,240 17.64%
Lighter Gray Count = 12,458 0.83%
Mid Gray Count = 1,222,992 81.53%

With just an introduction of less than 1% of lower level gray values (which I believe are magnfied), now the mid gray and white pixel bars look equal which they are not. The bars have just been clipped:

Screen Shot 2022-02-01 at 12.49.40 PM.jpg

So some would call that a bug and the software designers would call that a feature :)

Just some more information for consideration
John Wheeler
 
I still think Photoshop generates histograms incorrectly, guess it has to do with too many edges on the circle.



Note i only used single layer.


Its correct representation because gray square takes only takes 2.3% of picture, beige color takes 97.7% so ratio between them is so different.

square.jpg

Same exact experiment except using gray circle and how erroneously its represented on histogram like it takes 40% of image, when in reality only takes about 2.3%
circle.jpg



So some would call that a bug and the software designers would call that a feature :)
I don't see how is that a feature if it displaying incorrect information...

If you open this images in any other photo viewer than Photoshop e.g. FastStone Image Viewer and you will see that it shows histogram properly, equal representation for both images.

square_output.jpg

circle_output.jpg
 
Last edited:
I still think Photoshop generates histograms incorrectly, guess it has to do with too many edges on the circle.



Note i only used single layer.


Its correct representation because gray square takes only takes 2.3% of picture, beige color takes 97.7% so ratio between them is so different.

View attachment 127361

Same exact experiment except using gray circle and how erroneously its represented on histogram like it takes 40% of image, when in reality only takes about 2.3%
View attachment 127360




I don't see how is that a feature if it displaying incorrect information...

If you open this images in any other photo viewer than Photoshop e.g. FastStone Image Viewer and you will see that it shows histogram properly, equal representation for both images.

View attachment 127363

View attachment 127362

Hi @PutinHuilo

I actually don't see it as a feature either. I just ran some experiments to see what was going on and reporting on the results.
Having a situation where the histogram bars are truncated is not what I expected and it was confusing at first to me.

I mostly said that software designers would indicate that it was a feature as tongue in cheek. To some software designers, telling them that they have a bug is akin to saying their baby is ugly. The response can be at times not objective.

Here is the situation where it is of value though trying to eek out what was in the designers minds.

With a typical picture that is quite well balanced yet some areas are pure white to to the sensors limited dynamic range. You would have a reasonable number of pixels that were at 255, that would push down the relative height of all the non 255 pixels making the historgram of questionable usefulness in those cases. With the auto-leveling for the historgram, that majority of the historgram bars are uplifted better showing the histogram details for the majority of the image that is exposed OK. This allows you to make adjustment with more confidence even with the specular highlights being a singular very large bar (that is clipped).

Not trying to defend what Photoshop is doing, just pointing out where it might be useful (even if not totally correct).

John Wheeler
 

Back
Top