![]() |
Re: Vignette effect
You are great! This is much faster than my method: I draw white shape on black or grey (or in other grey scale color) background, apply blur and finally blend with image - effect is powerful, but blur part is very slow if greater radius is used.
Can I ask yet one more question? Your nice brightness function generates circle - is possible to use ellipse in image orientation? |
AW: Vignette effect
You could also apply this on an ellipse. The main idea is, to reduce the brightness depending on the distance to the edge.
So you have the width/height and the location (x, y). Now you must change the inner/outer radius from a absolute to a relative value. Argh :P at the moment I'm too tired to explain this complete. Fabian |
AW: Vignette effect
Delphi-Quellcode:
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) distance := SQRT(SQR(x) + SQR(Y)); |
AW: Vignette effect
Liste der Anhänge anzeigen (Anzahl: 1)
Mal eine Frage, sollte das Ergebnis nicht so aussehen ? (Image 1)
Bei eurer Methode kommt das dabei heraus. (Image 2) |
AW: Vignette effect
Moin,
hast du sein Bugfix eingebaut: Zitat:
Fabian |
AW: Vignette effect
Wie meinst du denn das ? I don't speak English.
|
Re: Vignette effect
X multiply something is nice, I added support for ellipse based on image oriantation. Thanks guys :)
My current slow methed I told yesterday (based on blured shape) - do you know method fast like the one by @sx2008, but with any shape (rectangle, rounded rectangle, ellipse and any other)? PS: @sx2008, your algorithm is named? |
AW: Vignette effect
Zitat:
Jetzt gibt es ein Radius der bestimmt, ab wann es nicht mehr dunkler wird. Und es gibt auch einen Radius der bestimmt ab wann es nicht mehr heller wird. Jetzt nimmt er den Abstand dazwischen, d.h. den Radius (das steht unter den Bruch). Und zusätzlich berechnet er über den Bruch, wie weit der Punkt vom Mittelpunkt entfernt ist (distance) und setzt das in Relation zum äußeren Radius (outer_radius). Umso größer die Distanz zum Mittelpunkt umso kleiner wird der unterschied zum äußeren Radius, somit sinkt der Wert über den Bruch und damit der komplette Bruch. Meine Theorie ist, dass du die falsche Version genommen hast, zumindest sieht das invertierte so aus. MfG Fabian |
Alle Zeitangaben in WEZ +1. Es ist jetzt 03:08 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