<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
Phew... I think I've gone a bit mad with the blending modes :D.<br>
I added a few. When counting everything together there should be
nearly 40 compositing modes now.<br>
All modes should trait partly transparent layers as Photoshop is
doing it and all modes should<br>
respect the channel flags.<br>
But there are two problems with this patch:<br>
<br>
1. I used a pretty generic approach. So it relies on the compiler to
do proper inlining. And i didn't use the optimized multiply
functions. I had a few problems with those functions, because it
seems the give no correct results but approximations. So I still
need to check out which composite modes will work with the optimized
functions. I just want to say that it could be that this is a
bit/much slower then the current implementation (i don't know how
much time you spend in optimizing this).<br>
I personally haven't noticed any speed impact but I've got a 3GHz
quad core, so i think i will be the last<br>
who will notice this.<br>
<br>
2. The "Hue" and "Saturation" modes are not working correctly but
the "Luminosity" and "Color" modes work exactly as in Photoshop. I
coded the algorithms after the ISO 3200-1 spec. Adobe released the
texts they gave to the ISO committee for specification. You can find
them here:<br>
<a class="moz-txt-link-freetext" href="http://www.adobe.com/devnet/pdf.html">http://www.adobe.com/devnet/pdf.html</a><br>
<a class="moz-txt-link-freetext" href="http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/PDF32000_2008.pdf">http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/PDF32000_2008.pdf</a>
(direct link)<br>
<br>
go to the category "Transparency" -> "Basic Composition
Computations". This spec is of course for PDFs but it seems that
Photoshop uses the same formulas.<br>
Since "Luminosity" and "Color" modes are working i think i made some
mistake in implementing the<br>
"setSat" function (on page 327). Maybe someone else has an
enlightenment, because I'm working in the dark right now :D.<br>
<br>
But apart from this two problems everything else should work fine
(hopefully).<span class="Apple-style-span" style="border-collapse:
separate; color: rgb(0, 0, 0); font-family: Ubuntu; font-size:
16px; font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: normal; orphans: 2;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px;"><span class="Apple-style-span"
style="color: rgb(51, 51, 51); font-family:
myriad-pro-1,myriad-pro-2,Helvetica,Arial,sans-serif; font-size:
12px; line-height: 16px;"></span></span>
</body>
</html>