A histogram for jAlbum

jAlbum 10.7 comes with a new plugin - a histogram. A histogram can assist you a lot with improving your images. Here’s first a short introduction to reading histograms.



A histogram is a graphical representation of the tonal distribution of colors in a digital image. In general, our images have an RGB-Color mode where R stands for red, G for green and B for blue. All three of them can take a value between 0 and 255. There are different modes of histogram that can show you e.g. only the red distribution.

The horizontal axis represents the different tonal values from 0 to 255, while the vertical axis represents the number of pixels in that particular tone value. The left side of the horizontal axis represents the black and dark areas, the middle represents medium grey and the right side represents light and pure white areas.


Image improvements with histograms

A histogram can be used to improve your images because there are some general rules describing how correctly exposed images should look in a histogram. Thus, improvements in picture brightness and contrast can be obtained.

The histogram for a very dark image will have the majority of its data points on the left side of the graph. It’s underexposed.



Conversely, the histogram for a very bright image will have most of its data points on the right side of the graph. It’s overexposed. 


If the graph is cut on the left or the right border, the image is highly underexposed or overexposed. In this case image details has been lost to blown-out highlights or blacked-out shadows that can’t be reconstructed. 


The graph of a histogram of a correctly exposed image should be predominantly in the center of the histogram. Nevertheless, there could be images that are correctly exposed but the histogram looks different. In night pictures for example, it shouldn’t be very bright. So you don't have the "right" histogram.



Furthermore, a histogram shows you if the image has a good contrast. A good contrast means that you have colors with nearly every value between 0 and 255, so a large spectrum. Low contrast images have a narrow spectrum:


 Source: desert picture:  http://www.jroller.com/gfx/entry/new_blendings_modes_for_java2d


Using the histogram in jAlbum

The histogram is located in the lower right corner of jAlbum's Edit panel. (Double click an image to enter edit mode.) As you play along with jAlbum's image tools like "Levels" and "Gamma" you will see how the histogram updates in real time to your changes. If you wish to keep the histogram visible at all times, just undock it to a separate window.


Features of the plugin

Just above the histogram you find the view mode selector. The different modes are:

  • Luminance: Show the type of brightness distribution. The absolute brightness is however not very meaningful, because  human eyes don't detect brightness linearly with color. Basically, we see green as brighter than blue. Thus, the term Luminance was invented, which is brightness adjusted to indicate appropriately what we really see. Luminance value =  0.3 R + 0.59 G + 0.11 B
  • Red/Green/Blue: Show the distribution of the particular color
  • RGB-Overlay: Show red, green and blue distributions in one histogram
  • RGB: Every bar represents an addition of R, G, B of that particular value.



The histogram can be undocked to a separate window in two ways:

  1. Click and drag the window to your preferred position
  2. Right-Click and choose undock in the menu to have the histogram automatically positioned next to jAlbum's main window.




Finally, you have a setting area where you can change some default settings to your preferred behavior.


General settings:

  • You can choose which view mode you want when you start editing an image.
  • You can decide if the histogram should be undocked when starting jAlbum.
  • You can decide if you want jAlbum to remember the position of the window of the histogram or if it should always use the default position.

In addition, you can choose your preferred visual style:

  • Photoshop vs. iPhoto: This setting only affects the RGB-Overlay-Mode (how the three channels are overlaid). The iPhoto style uses different transparencies, while the Photoshop style adds overlaid colors so that you could see on the basis of colors the Overlay.
  • White vs. Black: You can choose if you prefer white or black bars for luminance and RGB.


 About the author

 I'm a student from Berlin and I'm currently doing an internship at jAlbum. The histogram is the first plugin that I wrote. I'm looking forward to getting feedback from you. So what do you think? 


Sign in to post
Add your comment
Post comment
pons liliane

pons liliane 9 years ago

Merci pour ces excellentes explications.

Sarah Schölzel

Sarah Schölzel 10 years ago

Thank you very much.

Evert, inside jAlbum you can try to enhance your under-/ overexposed picture by using the gamma tool and also the levels tool (brightness and contrast).
Underexposed: move slider to right
Overexposed: move slider to left
But I suggest to use "gamma all" that means you uses the same gamma for all channels.


evert 10 years ago

I'm very impressed by how clearly you have explained this item, which for me has been a mistery for so many years. Bravo!
One suggestion please: Can you also give some short tips on how to enhance an under-/overexposed pic whith individually adjustments of R, G, B handlebars??


Jhito 10 years ago

Excelente, una gran ayuda para no estar editando la imagen en otro programa


mrag 10 years ago

Very nicely done. Did I miss a part about simply double clicking on the histogram to access the settings box and set the defaults?