Summary: | histogram visible while viewing photo | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | alfons.hoogervorst |
Component: | ImageEditor-Core | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | caulier.gilles |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 7.5.0 | |
Sentry Crash Report: | |||
Attachments: |
Blend the histogram on top of photos
Blend the histogram on top of photos (update 1) Blend the histogram on top of photos (update 2) Blend the histogram on top of photos (update 3) Blend the histogram on top of photos (update 4) Blend the histogram on top of photos (update 5) |
Description
alfons.hoogervorst
2005-02-06 17:20:39 UTC
Created attachment 9447 [details]
Blend the histogram on top of photos
May show some update glitches while resizing.
Created attachment 9454 [details]
Blend the histogram on top of photos (update 1)
* updated to work with CVS
* some minor code changes in canvas.c
* also make histogram work for showfoto
looks very interesting and i'm sure will be a useful addition. There are drawing glitches when scrolling. am working on the drawing glitches, expect a new patch soon. Created attachment 9474 [details]
Blend the histogram on top of photos (update 2)
Here's a decent attempt to fix scrolling glitches. If you scroll to much it
still flickers a bit, but at least it's better than what update 1 had.
Created attachment 9503 [details]
Blend the histogram on top of photos (update 3)
This patch fixes much of the flicker while scrolling.
Renchi, you want to apply this patch to CVS before 0.7.2 finale ? Gilles Caulier not yet. i will need to have a closer look at the patch first Patch apply on my computer. Implementation looking good. Result look good too, excepted 5 comments : - 1/ the histogram isn't recomputed if any color changes have applied on current image (like normalize color filter for example) - 2/ the histogram must be placed on left/right top/bottom place for let a maximum image area visible. Looking a photograph corner is normally less important than the center. The best solution is to provide a moving feature. - 3/ Improvement : there no way to change the current histogram channel. Only 'Luminosity' is displayed. Provide an contextual menu with RGB color channel selection will be great. - 4 / Please do not use tab caractor in your implementation, but only 4 white spce instead (:=))) - 5/ Please re-create you patch for the current digikam cvs. Renchi, digikam is now tagged for 0.7.2 release. I think the patch can be applied to cvs if is right for you. Your viewpoint ? Note: I have provide a screenshoot at this url : http://digikam3rdparty.free.fr/image_editor_with_blended_histogram.png Gilles Caulier >1/ the histogram isn't recomputed if any color changes have applied on current >image (like normalize color filter for example) Yep. I had a hack that did this, but it required a new virtual in another place. Will do that. > 2/ the histogram must be placed on left/right top/bottom place for let > a maximum image area visible. Looking a photograph corner is normally > less important than the center. The best solution is to provide a > moving feature. What about just clicking in the corners / inside the histogram? Left corner means that it sticks to the left edge etc? Does that sound agreeable? Will do that too. > 3/ Improvement : there no way to change the current histogram channel. Only > 'Luminosity' is displayed. Provide an contextual menu with RGB color channel > selection will be great. Will do that, and thought about how to represent this in the menu; I guess a toggle menu item will do? > 4/ Please do not use tab caractor in your implementation, but only 4 > white spce instead (:=))) > 5/ Please re-create you patch for the current digikam cvs. Ah, yeah, tab vs. spaces. :-) Will do both of the two. Another problem too : move a plugin dialog under the histogram area and look like the histogram blending mode isn't correctly restored on the current image A nice day Gilles Caulier #2 : look in my screenshot. I have move the histogram position at canvas (with/6, height/6) for testing. It's in the top/left corner on the image like this (this is an example). About moving feature, just intercept the current mouse position when the cursor is under the histogram area an detect when left button is pressed. in this case, change the cursor form and change the center point of the histogram area accordinly with the mouse position. Take a look in widget source code used in image editor plugins, like in Ratio crop tool. Gilles Caulier |Another problem too : move a plugin dialog under the histogram area |and look like |the histogram blending mode isn't correctly restored |on the current image Yeah, the original repaint routine alphablended from the histogram's origin to the exposed rectangle, where it should only alphablend the exposed rectangle. I'm working on most of the other issues - you can track progress here: http://hoogervorst.dyndns.org/cgi-bin/darcs.cgi/kdeextragear-3/digikam/?c=patches Right now there's not much, but I'll commit the basic patch and incremental changes in a few hours or-so. OK. Have you an access to write in KDE CVS ? If i commit this code in digikam repository (when it will finalized), it will be cool if you continue to contrib to digiKam project for maintaining this code in the future... Gilles Caulier Created attachment 10090 [details]
Blend the histogram on top of photos (update 4)
Thanks for the heads up.
Here's an updated patch to play with. Most of the things you suggested are
there, with the exception of displaying histogram for the other channels. I
work on this this week.
OK, cool... I will checked your patch tomorrow morning and provide a feedback... Thanks for your contibution. Gilles Caulier Created attachment 10137 [details]
Blend the histogram on top of photos (update 5)
Here's another update, now also allows you to switch between different color
channel histograms.
I'm doing minor refactoring on the code over the next days, so let me know
about any wishes, necessary fixes, etc.
Look good. Accordinly with Joern Ahren, I will commit your code to cvs. All new fix will be apply directly on. Are you write cvs acces ? Do you want to continue to contrib in digiKam directly using kde repository ? Gilles Caulier CVS commit by cgilles: Patch from Alfons Hoogervorst <alfons.hoogervorst@gmail.com> about histogram visible while viewing photo in digiKam image editor using blending. CCBUGS: 98706 CCMAIL: digikam-devel@lists.sourceforge.net M +3 -2 showfoto/Makefile.am 1.8 M +40 -0 showfoto/showfoto.cpp 1.23 M +3 -0 showfoto/showfoto.h 1.16 M +1 -0 showfoto/showfotoui.rc 1.12 M +1 -0 utilities/imageeditor/Makefile.am 1.20 M +519 -5 utilities/imageeditor/canvas.cpp 1.36 M +20 -0 utilities/imageeditor/canvas.h 1.24 M +2 -1 utilities/imageeditor/digikamimagewindowui.rc 1.8 M +42 -0 utilities/imageeditor/imagewindow.cpp 1.91 M +3 -0 utilities/imageeditor/imagewindow.h 1.38 CVS commit by ach: There a configure check for libjpegs name. Make use of it. CCBUGS:98706 M +1 -1 kioslave/Makefile.am 1.14 M +1 -1 showfoto/Makefile.am 1.9 M +1 -1 utilities/cameragui/Makefile.am 1.12 --- kdeextragear-3/digikam/kioslave/Makefile.am #1.13:1.14 @@ -7,5 +7,5 @@ kio_digikamthumbnail_la_SOURCES = digikamthumbnail.cpp parse.c -kio_digikamthumbnail_la_LIBADD = $(LIB_KIO) -ljpeg $(LIBPNG) +kio_digikamthumbnail_la_LIBADD = $(LIB_KIO) $(LIBJPEG) $(LIBPNG) kio_digikamthumbnail_la_LDFLAGS = -module -avoid-version $(all_libraries) \ $(KDE_PLUGIN) $(LIB_IMLIB2) $(LIBKEXIF_LIBS) --- kdeextragear-3/digikam/showfoto/Makefile.am #1.8:1.9 @@ -8,5 +8,5 @@ showfoto_LDADD = $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) \ - $(LIB_KFILE) $(LIB_KPARTS) -ljpeg \ + $(LIB_KFILE) $(LIB_KPARTS) $(LIBJPEG) \ $(top_builddir)/digikam/utilities/imageeditor/libimagecanvas.la \ $(top_builddir)/digikam/libs/histogram/libhistogram.la --- kdeextragear-3/digikam/utilities/cameragui/Makefile.am #1.11:1.12 @@ -12,5 +12,5 @@ libcameragui_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -libcameragui_la_LIBADD = $(LIB_GPHOTO) $(LIBKEXIF_LIBS) -ljpeg +libcameragui_la_LIBADD = $(LIB_GPHOTO) $(LIBKEXIF_LIBS) $(LIBJPEG) INCLUDES= -I$(top_srcdir)/digikam/digikam \ Since Alfons' nice work is already applied to digikam, we can close this wish. Alfons, I have done several enhancements to the Image Editor, including some refactoring of the Histogram code. Could you please take a look? It's submitted as KDE bug #110514. |