AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Suchfunktion Ergebnis der Suchanfrage

Ergebnis der Suchanfrage


Datum des Suchindex: Heute, 16:17

Parameter dieser Suchanfrage:

Suche in Thema: Vignette effect
Suche alle Beiträge, die von "sx2008" geschrieben wurden
• Suchmethode: "Suche nach allen Begriffen"
• Nach Datum (firstpost) sortiert
• Zeige Treffer als Beiträge
Zeige 5 von insges. 5 Treffern
Suche benötigte 0.002s

Es liegen Ergebnisse in folgenden Bereichen vor:

  • Forum: Multimedia

    AW: Vignette effect

      Delphi
      by sx2008, 18. Sep 2010
    function CalcVignetteBrightness(X, Y: Single): Single;
    var
    distance : Single;
    inner_radius, outer_radius, : Single;
    begin
    inner_radius := 50;
    outer_radius := 150;
    x := x * 0.75; // <= try this

    // calculate the distance from the origin (center of the image)
  • Forum: Multimedia

    AW: Re: Vignette effect

      Delphi
      by sx2008, 18. Sep 2010
    Hmm ,there is a little bug:
    else if distance <= outer_radius then
    // decreasing Brightness from 100% downto 0%
    // result := (distance - inner_radius) / (outer_radius - inner_radius) // wrong
    result := (outer_radius - distance) / (outer_radius - inner_radius)
  • Forum: Multimedia

    AW: Re: Vignette effect

      Delphi
      by sx2008, 18. Sep 2010
    You must multiply with the brightness factor.
    And you have to care about arithmetic overflow.

    function ClampByte(value:Integer):Byte;
    begin
    if value > 255 then
    result := 255
    (* not neccesary when a pixel is multiplied with a positive value
    else if value < 0
    result := 0
  • Forum: Multimedia

    AW: Vignette effect

      Delphi
      by sx2008, 17. Sep 2010
    I think the following function is faster and easier to understand
    than the gaussian function:

    function CalcVignetteBrightness(X, Y: Single): Single;
    var
    distance : Single;
    inner_radius, outer_radius : Single;
    begin
    inner_radius := 50;
    outer_radius := 150;
  • Forum: Multimedia

    AW: Vignette effect

      Delphi
      by sx2008, 16. Sep 2010
    You could calculate the brightness of every Pixel with a 2-dimensional Gaussian function.
    Here is some Pseudocode:
    xcenter := Bitmap.Width div 2;
    ycenter := Bitmap.Height div 2;
    for each Pixel do
    begin
    brightness_factor := mygaussian(x - xcenter, y-ycenter)* 0.5{=effect depth} + 0.3{basic brightness};
    Pixel.red := Pixel.red * brightness_factor;
    Pixel.green := Pixel.green *...


URL zu dieser Suchanfrage:

https://www.delphipraxis.net/dp_search.php?do=usersearch&search_username=sx2008&search_exact_username=1&search_sortby=dateline&search_resulttype=post&search_matchmode=0&searchthreadid=154568
Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 16:30 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz