Bug 376048 - Filter "Levels" wrong histogram
Summary: Filter "Levels" wrong histogram
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Filters (show other bugs)
Version: 3.1.1
Platform: Other Unspecified
: NOR normal
Target Milestone: ---
Assignee: Halla Rempt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-05 13:24 UTC by honix
Modified: 2019-05-02 09:19 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Original hosto (bottom), curve histo (right), and wrong levels histo (left) (88.17 KB, image/jpeg)
2017-02-05 13:24 UTC, honix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description honix 2017-02-05 13:24:36 UTC
Created attachment 103841 [details]
Original hosto (bottom), curve histo (right), and wrong levels histo (left)

Hello!

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.

Thanks!
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

https://invent.kde.org/kde/krita/commit/525da2eaa913dee3fcd3150afd97db730371368e