Re: Compositing and Blending

THIS IS A RESEND TO THE GROUP...

On Mon, Aug 6, 2012 at 11:16 PM, Rik Cabanier <cabanier@gmail.com> wrote:

>
>
> On Mon, Aug 6, 2012 at 1:45 AM, Bob Holmes <rangsynth@gmail.com> wrote:
>
>> Two stage blend then composite is how I originally implemented it.
>> This was a while back and I just implemented from descriptions of
>> raster modes in windows help files and from the modes in apple quartz
>> help files.
>>
>> So my first implementation used unpremultiplied for what was called
>> the blend, and then I had an option of either doing a source over or a
>> direct write after the blend.
>>
>> I was reading your spec, libpixman and the apple quartz files and pdf
>> and it seemed like it was all one stage, so I changed my
>> implementation to support a one stage approach.
>>
>> With one operator only if you want to do color effects after the
>> composite then you need to unpremultiply the result, and also possibly
>> the input dca and sca if you need those in post composite effects.
>>
>> I think the split is a good idea, but there seem confusing statements
>> floating around in SVG spec itself that says things like this for
>> "feBlend" filter effect...
>>
>> "NORMAL MODE IS THE SAME AS SRC-OVER ON feCOMPOSITITE and the SAME AS
>> DEFAULT BEHAVIOUR ON feMerge"
>>
>> But how can the NORMAL BLEND MODE be the same as SRC-OVER. Surely that
>> terminology means that there is NO BLEND MODE and ONLY SRC-OVER
>> COMPOSITE.
>> Your new spec does not do this and just returns "Cs" for NORMAL MODE.
>>
>> Does this mean that feBlend will get a composite mode as well?
>
>
> Yes, from
> https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#feBlendElement
> :
>
> This filter composites two objects together using commonly used imaging
> software blending modes. It performs a pixel-wise combination of two input
> images.
>
>
>
>
>>
>>
>> On 8/6/12, Rik Cabanier <cabanier@gmail.com> wrote:
>> > On Sun, Aug 5, 2012 at 3:10 AM, Bob Holmes <rangsynth@gmail.com> wrote:
>> >
>> >> THESE DOCUMENTS...
>> >>
>> >> 1)
>> >>
>> https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#backdropexamples
>> >> 2) http://www.w3.org/TR/SVGCompositing/
>> >>
>> >> States that ...
>> >>
>> >> Blending is the aspect of compositing that calculates the mixing of
>> >> colors where the source element and backdrop overlap. Blending takes
>> >> the colors of the source element and mixes them with the backdrop in
>> >> areas where the source element and backdrop overlap. Conceptually, the
>> >> colors in the source element are blended in place with the backdrop.
>> >> After blending, the modified source element is composited with the
>> >> backdrop. In practice, this is usually all performed in one step.
>> >>
>> >> I THINK WHAT IT MEANS TO SAY IS THAT "ALL THE BLENDING AND
>> >> COMPOSITING" IS ACTUALLY REDUCED TO WELL DEFINED FUNCTIONS AS
>> >> DESCRIBED IN THE SECOND DOCUMENT.
>> >>
>> >> In other words the first document is making a distinction between the
>> >> blending and the compositing, but in theory the functions are defined
>> >> as singular functions already in the second? So why the distinction
>> >> between the two in the first document?
>> >>
>> >> Is this correct?
>> >>
>> >
>> > Not quite. Only blending + src-over is described in the SVG compositing
>> > spec.
>> > In practice, this is what will happen most of the time so I expect that
>> > browsers (that do software rendering) will optimize that particular
>> path.
>> >
>> > The new document allows any composting operation to happen after
>> blending.
>> > This will allow effects that were not very hard or impossible to achieve
>> > with the old spec.
>> > For instance, the new spec allows you to blend with the backdrop, but
>> then
>> > composite with 'source'. This will remove the backdrop but will still
>> show
>> > the interaction of the backdrop with the source.
>> > Other hard to achieve effects allow masking of the blended source with
>> the
>> > backdrop,
>> >
>> > We've had a conversation on the splitting of the properties on this
>> list.
>> > Just search for [css-compositing].
>> > Let me know if you have question or if you feel that the split should
>> not
>> > happen.
>> >
>> > Rik
>> >
>>
>
>

Received on Monday, 6 August 2012 21:32:34 UTC