[Bug 156809] [PATCH] kimgio doesn't support the GIMP 2.x layer blending modes

David Benjamin dnas.dnas at gmail.com
Sun Jan 27 22:44:24 CET 2008


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=156809         




------- Additional Comments From dnas.dnas gmail com  2008-01-27 22:44 -------
Created an attachment (id=23315)
 --> (http://bugs.kde.org/attachment.cgi?id=23315&action=view)
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.


More information about the Kdelibs-bugs mailing list