Bug 376048

Summary: Filter "Levels" wrong histogram
Product: [Applications] krita Reporter: honix <ted888>
Component: FiltersAssignee: Halla Rempt <halla>
Severity: normal CC: griffinvalley, halla, raghu
Priority: NOR    
Version: 3.1.1   
Target Milestone: ---   
Platform: Other   
OS: Unspecified   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Original hosto (bottom), curve histo (right), and wrong levels histo (left)

Description honix 2017-02-05 13:24:36 UTC
Created attachment 103841 [details]
Original hosto (bottom), curve histo (right), and wrong levels histo (left)


Filter "Levels" and Filter "Threshhold" shows wrong histogram. Looks like it scaled by ~ 1/0.75 or so. Bars becomes little fat also because of that bug.

Comment 1 wolthera 2017-02-05 15:41:35 UTC
That's because it is a LAB histogram, not a RGB histogram. Not sure what to do with this...
Comment 2 Raghavendra kamath 2017-07-26 10:55:44 UTC
I saw a weird behaviour regarding this. If you switch to logarithmic and switch back to normal again it shows the correct one. Also i noticed that histogram (wrong one) is a bit pixelated, could it be that it is stretched horizontally beyond the graph?
Comment 3 Halla Rempt 2019-05-02 08:52:56 UTC
I think that raghukamath is right here. Also, this bug must always have been in the levels filter dialog, since the histogram drawing code has never been touched.
Comment 4 Halla Rempt 2019-05-02 09:19:51 UTC
Git commit 525da2eaa913dee3fcd3150afd97db730371368e by Boudewijn Rempt.
Committed on 02/05/2019 at 09:17.
Pushed by rempt into branch 'master'.

Fix displaying the levels histogram

There were some weird things wrong with the layout of the dialog,
and for some reason, some hard-coded sizes coupled with hard-coded
cutting off from the histogram pixmap.

M  +8    -8    plugins/filters/levelfilter/kis_level_filter.cpp
M  +2    -2    plugins/filters/levelfilter/kis_level_filter.h
M  +13   -13   plugins/filters/levelfilter/wdg_level.ui