Re: [Gimp-developer] Multiply blend mode in GIMP
- From: Michael Henning <mikehenning darkrefraction com>
- To: Calculemus <calculemus1988 gmail com>
- Cc: gimp-developer <gimp-developer-list gnome org>
- Subject: Re: [Gimp-developer] Multiply blend mode in GIMP
- Date: Mon, 9 Jul 2012 15:39:27 -0400
Each pixel component has a value somewhere between 0 and 255. When you
multiply two together, it will have a value somewhere between 0 and
65,025 (255 squared). You need to divide by 255 so that maximum value
gets scaled back down to 255 (If you simply clamp it, the majority of
your pixels will be white).
Of course, when working with doubles or floats, 1.0 is normally the
maximum (Non-HDR) value, so no division is needed.
Hopefully that clears things up.
-- drawoc
On Mon, Jul 9, 2012 at 3:21 PM, Calculemus <calculemus1988 gmail com> wrote:
> I am reading this: docs.gimp.org/en/gimp-concepts-layer-modes.html
>
> and I wonder why is the formula for "Multiply", E = (M * I) / 255?
>
> Why divide with 255, that is the part that confuses me.
> Should it not be just M * I and then clamp the result in range 0 to 255?
>
> Thanks
>
> _______________________________________________
> gimp-developer-list mailing list
> gimp-developer-list gnome org
> https://mail.gnome.org/mailman/listinfo/gimp-developer-list
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]