AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Multimedia Delphi [GR32] How to add intensity?
Thema durchsuchen
Ansicht
Themen-Optionen

[GR32] How to add intensity?

Ein Thema von WojTec · begonnen am 22. Jan 2010 · letzter Beitrag vom 12. Jun 2010
 
Benutzerbild von jfheins
jfheins

Registriert seit: 10. Jun 2004
Ort: Garching (TUM)
4.579 Beiträge
 
#4

Re: [GR32] How to add intensity?

  Alt 22. Jan 2010, 15:43
I would do something like this:

1. You have the "target color" (full brightness and saturation) and the amount you want to blend (between 0 and 1)

2. For each Pixel do:
2.1: multiply the target color with the brightness of the image pixel
2.2: mix the image pixel and the result from 2.1 together, according to the amount.

(1-x) * image_pixel + x * (color * image_pixel_brightness)

The Brigness of a pixel is calculated by adding up all the components and dividung the result by 3. However, there is an advanced formula that weights the colors differently.
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:26 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz