Summary: | [PATCH] kimgio doesn't support the GIMP 2.x layer blending modes | ||
---|---|---|---|
Product: | [Unmaintained] kdelibs | Reporter: | David Benjamin <davidben> |
Component: | kimgio | Assignee: | kdelibs bugs <kdelibs-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Patch that implements the missing blending modes
Test cases |
Description
David Benjamin
2008-01-27 22:34:01 UTC
Created attachment 23315 [details]
Patch that implements the missing blending modes
(Yay! My first non-trivial patch! :-D)
New blending modes:
DODGE_MODE
BURN_MODE
HARDLIGHT_MODE
SOFTLIGHT_MODE
GRAIN_EXTRACT_MODE
GRAIN_MERGE_MODE
Removed:
ERASE_MODE
REPLACE_MODE
ANTI_ERASE_MODE
These appear to have been internal things or something... there isn't such a
mode in the UI, their spots in the enums have been overwritten in the new GIMP
sources, and no implementation of them was ever made for kimgio. (Similarly,
the GIMP 2.x "blending mode" COLOR_ERASE isn't in this patch... I think it's
internal.)
Other stuff:
Some files take a few seconds to render and thumbnail. The GIMP has MMX, SSE,
etc. instructions. I don't know whether it'd be worth doing something like that
here. I'll try to refactor the code in any case and see if I can make it a bit
faster later. (Probably not really worth it to have several versions of each
blending mode and a switch on each pixel... the GIMP uses separate functions
for each mode which handle each pixel format and do all pixels.)
Also, would it be reasonable, for really big XCFs, to scale first, then blend?
Especially for a thumbnail, I don't think the minor loss in accuracy would be
important.
Also, there was a slight typo in one of the comments in gimp.h.
And... hopefully I didn't do anything stupid like forget a break or something.
Created attachment 23316 [details]
Test cases
Including all the new blending modes.
SVN commit 767369 by uwolfer: Add support for GIMP 2.x layer blending modes. Patch by David Benjamin, thanks. BUG:156809 M +9 -4 gimp.h M +258 -3 xcf.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=767369 |