app: gimp_histogram_editor_info_update(): use the real number of bins

for displaying histogram info, not always 255.
This commit is contained in:
Michael Natterer 2013-06-12 01:01:39 +02:00
parent 0f0590426d
commit 96d1a9392e
1 changed files with 4 additions and 1 deletions

View File

@ -516,11 +516,14 @@ gimp_histogram_editor_info_update (GimpHistogramEditor *editor)
if (hist) if (hist)
{ {
gint n_bins;
gdouble pixels; gdouble pixels;
gdouble count; gdouble count;
gchar text[12]; gchar text[12];
pixels = gimp_histogram_get_count (hist, view->channel, 0, 255); n_bins = gimp_histogram_n_bins (hist);
pixels = gimp_histogram_get_count (hist, view->channel, 0, n_bins - 1);
count = gimp_histogram_get_count (hist, view->channel, count = gimp_histogram_get_count (hist, view->channel,
view->start, view->end); view->start, view->end);