Skip to content

Commit f7e2848

Browse files
committed
New Effects > Edge > Gradient flow tool
I'm doing some promising prototyping on a magnetic lasso tool, but testing the results interactively has proven difficult because it's hard to see how PD si analyzing object boundaries when attempting to "magnetize" the lasso to nearby boundaries. So I wrote a visualizer for showing gradient flow calculations in the current image, and it's been so helpful that I may as well expose it to users. I've cleaned up the prototype code a bit and added some options to make output easier to understand. In this context, "gradient" doesn't refer to the Photoshop-esque term of smoothly fading between colors - instead it refers to something closer to edge-detection: https://en.wikipedia.org/wiki/Image_gradient PD uses various internal functions to calculate gradient magnitude and direction for each pixel in an image, and those results are used as inputs for all kinds of other effects. The purpose of this new tool is to paint those gradient calculations directly onto the image, so you can see where object boundaries lay, at least as far as PD knows. The most interesting setting on this new tool is the "direction" output, which paints little arrows across the image, with each arrow's direction and length showing where PD detects an object boundary (and how strong it thinks that boundary is). For an obvious example of how it works, paint a black-and-white reflection gradient using PD's gradient tool, then run this new Effects > Edge > Gradient tool on the result, with the "direction" setting active. (If your base image is large, you may need to crank up the boost and/or sample radius settings.)
1 parent 0c8e628 commit f7e2848

18 files changed

+1285
-111
lines changed

App/PhotoDemon/Languages/French.xml

Lines changed: 54 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<langid>fr-FR</langid>
88
<langname>Français</langname>
9-
<langversion>6.7.507</langversion>
9+
<langversion>6.7.508</langversion>
1010
<langstatus>Complete</langstatus>
1111

1212
<author>Jean Jacques Piedfort (orig. Frank Donckers)</author>
@@ -2002,6 +2002,11 @@ Dans la version 6.0, les fichiers de macros PhotoDemon ont été refondus pour s
20022002
<translation>Recherche des contours</translation>
20032003
</phrase>
20042004

2005+
<phrase>
2006+
<original>Gradient flow</original>
2007+
<translation></translation>
2008+
</phrase>
2009+
20052010
<phrase>
20062011
<original>Range filter</original>
20072012
<translation>Filtre de gamme</translation>
@@ -2287,7 +2292,7 @@ Dans la version 6.0, les fichiers de macros PhotoDemon ont été refondus pour s
22872292
<translation>Effacer la liste récente des macros</translation>
22882293
</phrase>
22892294

2290-
<!-- Menus.bas contains 265 phrases. 30 were duplicates of existing phrases, so only 235 new phrases were written to file. -->
2295+
<!-- Menus.bas contains 266 phrases. 30 were duplicates of existing phrases, so only 236 new phrases were written to file. -->
22912296

22922297
<phrase>
22932298
<original>All supported palettes</original>
@@ -5304,7 +5309,7 @@ La mise à jour est traitée automatiquement en arrière-plan. Vous recevrez une
53045309
<translation>Langue changée avec succès.</translation>
53055310
</phrase>
53065311

5307-
<!-- MainWindow.frm contains 366 phrases. 187 were duplicates of existing phrases, so only 179 new phrases were written to file. -->
5312+
<!-- MainWindow.frm contains 367 phrases. 188 were duplicates of existing phrases, so only 179 new phrases were written to file. -->
53085313

53095314
<phrase>
53105315
<original>Monochrome Conversion</original>
@@ -13560,12 +13565,54 @@ Si vous choisissez de désactiver les mises à jour, n'oubliez pas de visiter ph
1356013565

1356113566
<!-- Tools_ScreenVideoPrefs.frm contains 17 phrases. 7 were duplicates of existing phrases, so only 10 new phrases were written to file. -->
1356213567

13568+
<phrase>
13569+
<original>render</original>
13570+
<translation></translation>
13571+
</phrase>
13572+
13573+
<phrase>
13574+
<original>boost</original>
13575+
<translation></translation>
13576+
</phrase>
13577+
13578+
<phrase>
13579+
<original>foreground color</original>
13580+
<translation></translation>
13581+
</phrase>
13582+
13583+
<phrase>
13584+
<original>Calculating gradient flow</original>
13585+
<translation></translation>
13586+
</phrase>
13587+
13588+
<phrase>
13589+
<original>magnitude</original>
13590+
<translation></translation>
13591+
</phrase>
13592+
13593+
<phrase>
13594+
<original>direction</original>
13595+
<translation></translation>
13596+
</phrase>
13597+
13598+
<phrase>
13599+
<original>dynamic</original>
13600+
<translation></translation>
13601+
</phrase>
13602+
13603+
<phrase>
13604+
<original>static</original>
13605+
<translation></translation>
13606+
</phrase>
13607+
13608+
<!-- Effects_Edge_GradientFlow.frm contains 13 phrases. 5 were duplicates of existing phrases, so only 8 new phrases were written to file. -->
13609+
1356313610
<!-- Automatic text extraction complete. -->
1356413611

13565-
<phrasecount>2568</phrasecount>
13612+
<phrasecount>2577</phrasecount>
1356613613

13567-
<!-- As of this build, PhotoDemon contains 5123 phrases. -->
13568-
<!-- 2555 are duplicates, so only 2568 unique phrases have been written to file. -->
13569-
<!-- These 2568 phrases contain approximately 11907 total words. -->
13614+
<!-- As of this build, PhotoDemon contains 5138 phrases. -->
13615+
<!-- 2561 are duplicates, so only 2577 unique phrases have been written to file. -->
13616+
<!-- These 2577 phrases contain approximately 11920 total words. -->
1357013617

1357113618
</pdData>

App/PhotoDemon/Languages/German.xml

Lines changed: 74 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<langid>de-DE</langid>
88
<langname>Deutsch (DE)</langname>
9-
<langversion>9.0.57</langversion>
9+
<langversion>9.0.62</langversion>
1010
<langstatus>Up-to-date</langstatus>
1111

1212
<author>rk (ehem. Frank Donckers, Helmut Kuerbiss)</author>
@@ -83,7 +83,7 @@
8383

8484
<phrase>
8585
<original>Add it to the current image as a new layer.</original>
86-
<translation>Es dem aktuellen Bild als einen neuen Layer hinzufügen.</translation>
86+
<translation>Es dem aktuellen Bild als neuen Layer hinzufügen.</translation>
8787
</phrase>
8888

8989
<phrase>
@@ -1428,12 +1428,12 @@ In Version 6.0 wurden PhotoDemon-Makrodateien überarbeitet, um neue Features zu
14281428

14291429
<phrase>
14301430
<original>Go to layer above</original>
1431-
<translation>Gehe zu Layer oberhalb</translation>
1431+
<translation>Gehe zu Layer darüber</translation>
14321432
</phrase>
14331433

14341434
<phrase>
14351435
<original>Go to layer below</original>
1436-
<translation>Gehe zu Layer unterhalb</translation>
1436+
<translation>Gehe zu Layer darunter</translation>
14371437
</phrase>
14381438

14391439
<phrase>
@@ -2001,6 +2001,11 @@ In Version 6.0 wurden PhotoDemon-Makrodateien überarbeitet, um neue Features zu
20012001
<translation>Kanten finden</translation>
20022002
</phrase>
20032003

2004+
<phrase>
2005+
<original>Gradient flow</original>
2006+
<translation></translation>
2007+
</phrase>
2008+
20042009
<phrase>
20052010
<original>Range filter</original>
20062011
<translation>Bereichsfilter </translation>
@@ -2286,7 +2291,7 @@ In Version 6.0 wurden PhotoDemon-Makrodateien überarbeitet, um neue Features zu
22862291
<translation>Liste jüngster Makros löschen</translation>
22872292
</phrase>
22882293

2289-
<!-- Menus.bas contains 265 phrases. 30 were duplicates of existing phrases, so only 235 new phrases were written to file. -->
2294+
<!-- Menus.bas contains 266 phrases. 30 were duplicates of existing phrases, so only 236 new phrases were written to file. -->
22902295

22912296
<phrase>
22922297
<original>All supported palettes</original>
@@ -5304,7 +5309,7 @@ Das Update wird automatisch im Hintergrund verarbeitet. Sie werden ein neue Bena
53045309
<translation>Sprache erfolgreich geändert.</translation>
53055310
</phrase>
53065311

5307-
<!-- MainWindow.frm contains 366 phrases. 187 were duplicates of existing phrases, so only 179 new phrases were written to file. -->
5312+
<!-- MainWindow.frm contains 367 phrases. 188 were duplicates of existing phrases, so only 179 new phrases were written to file. -->
53085313

53095314
<phrase>
53105315
<original>Monochrome Conversion</original>
@@ -9444,7 +9449,7 @@ Möchten Sie Ihre Batchliste vor dem Beenden speichern?</translation>
94449449

94459450
<phrase>
94469451
<original>1) By manually adding one or more image file(s) using a standard Open Image dialog.</original>
9447-
<translation>1) Durch manuelle Hinzufügung einer oder mehrerer Bilddatei(en) unter Verwendung eines Standarddialogs "Bild öffnen".</translation>
9452+
<translation>1) Durch manuelle Hinzufügung einer oder mehrerer Bilddatei(en) unter Verwendung eines Standard-Dialogs "Bild öffnen".</translation>
94489453
</phrase>
94499454

94509455
<phrase>
@@ -9681,7 +9686,7 @@ Möchten Sie Ihre Batchliste vor dem Beenden speichern?</translation>
96819686

96829687
<phrase>
96839688
<original>This button only affects the preview above. The repeat setting on the right is what will be used by the exported image file.</original>
9684-
<translation>Dieser Button wirkt sich nur auf die obige Vorschau aus. Die Wiederholungseinstellung auf der rechten Seite ist das, was von der exportierten Bilddatei verwendet wird.</translation>
9689+
<translation>Dieser Button wirkt sich nur auf die Vorschau oberhalb aus. Die Wiederholungseinstellung auf der rechten Seite ist das, was von der exportierten Bilddatei verwendet wird.</translation>
96859690
</phrase>
96869691

96879692
<phrase>
@@ -10437,7 +10442,7 @@ Für diese Unannehmlichkeit möchte ich mich wirklich entschuldigen, aber unglü
1043710442

1043810443
<phrase>
1043910444
<original>standard PNG</original>
10440-
<translation>Standard PNG</translation>
10445+
<translation>Standard-PNG</translation>
1044110446
</phrase>
1044210447

1044310448
<phrase>
@@ -11093,12 +11098,12 @@ Für diese Unannehmlichkeit möchte ich mich wirklich entschuldigen, aber unglü
1109311098

1109411099
<phrase>
1109511100
<original>top of layer stack</original>
11096-
<translation>Ganz oben von Layer-Stapel</translation>
11101+
<translation>Ganz oben des Layer-Stacks</translation>
1109711102
</phrase>
1109811103

1109911104
<phrase>
1110011105
<original>bottom of layer stack</original>
11101-
<translation>Ganz unten von Layer-Stapel</translation>
11106+
<translation>Ganz unten des Layer-Stacks</translation>
1110211107
</phrase>
1110311108

1110411109
<!-- Layer_Add_RasterLayer.frm contains 18 phrases. 12 were duplicates of existing phrases, so only 6 new phrases were written to file. -->
@@ -11254,62 +11259,62 @@ Für diese Unannehmlichkeit möchte ich mich wirklich entschuldigen, aber unglü
1125411259

1125511260
<phrase>
1125611261
<original>Click: show the "New layer" dialog</original>
11257-
<translation></translation>
11262+
<translation>Klick: Den Dialog "Neuer Layer" zeigen</translation>
1125811263
</phrase>
1125911264

1126011265
<phrase>
1126111266
<original>Shift + Click: add a blank layer</original>
11262-
<translation></translation>
11267+
<translation>Shift+Mausklick: Einen blanken Layer hinzufügen</translation>
1126311268
</phrase>
1126411269

1126511270
<phrase>
1126611271
<original>Add layer</original>
11267-
<translation></translation>
11272+
<translation>Layer hinzufügen</translation>
1126811273
</phrase>
1126911274

1127011275
<phrase>
1127111276
<original>Click: delete this layer</original>
11272-
<translation></translation>
11277+
<translation>Klick: Diesen Layer löschen</translation>
1127311278
</phrase>
1127411279

1127511280
<phrase>
1127611281
<original>Click: move this layer up the layer stack</original>
11277-
<translation></translation>
11282+
<translation>Klick: Diesen Layer im Layer-Stack nach oben verschieben</translation>
1127811283
</phrase>
1127911284

1128011285
<phrase>
1128111286
<original>Shift + Click: merge this layer with the layer above it</original>
11282-
<translation></translation>
11287+
<translation>Shift+Mausklick: Diesen Layer mit dem Layer darüber zusammenführen</translation>
1128311288
</phrase>
1128411289

1128511290
<phrase>
1128611291
<original>Move or merge layer up</original>
11287-
<translation></translation>
11292+
<translation>Layer nach oben verschieben oder zusammenführen</translation>
1128811293
</phrase>
1128911294

1129011295
<phrase>
1129111296
<original>Click: move this layer down the layer stack</original>
11292-
<translation></translation>
11297+
<translation>Klick: Diesen Layer im Layer-Stack nach unten verschieben</translation>
1129311298
</phrase>
1129411299

1129511300
<phrase>
1129611301
<original>Shift + Click: merge this layer with the layer beneath it</original>
11297-
<translation></translation>
11302+
<translation>Shift+Mausklick: Diesen Layer mit dem Layer darunter zusammenführen</translation>
1129811303
</phrase>
1129911304

1130011305
<phrase>
1130111306
<original>Move or merge layer down</original>
11302-
<translation></translation>
11307+
<translation>Layer nach unten verschieben oder zusammenführen</translation>
1130311308
</phrase>
1130411309

1130511310
<phrase>
1130611311
<original>Click: add a duplicate of this layer</original>
11307-
<translation></translation>
11312+
<translation>Klick: Ein Duplikat dieses Layers hinzufügen</translation>
1130811313
</phrase>
1130911314

1131011315
<phrase>
1131111316
<original>Duplicate layer</original>
11312-
<translation></translation>
11317+
<translation>Layer duplizieren</translation>
1131311318
</phrase>
1131411319

1131511320
<!-- Layerpanel_Layers.frm contains 22 phrases. 9 were duplicates of existing phrases, so only 13 new phrases were written to file. -->
@@ -13543,12 +13548,54 @@ Wenn Sie trotzdem Updates deaktivieren möchten, vergessen Sie nicht, photodemon
1354313548

1354413549
<!-- Tools_ScreenVideoPrefs.frm contains 17 phrases. 7 were duplicates of existing phrases, so only 10 new phrases were written to file. -->
1354513550

13551+
<phrase>
13552+
<original>render</original>
13553+
<translation></translation>
13554+
</phrase>
13555+
13556+
<phrase>
13557+
<original>boost</original>
13558+
<translation></translation>
13559+
</phrase>
13560+
13561+
<phrase>
13562+
<original>foreground color</original>
13563+
<translation></translation>
13564+
</phrase>
13565+
13566+
<phrase>
13567+
<original>Calculating gradient flow</original>
13568+
<translation></translation>
13569+
</phrase>
13570+
13571+
<phrase>
13572+
<original>magnitude</original>
13573+
<translation></translation>
13574+
</phrase>
13575+
13576+
<phrase>
13577+
<original>direction</original>
13578+
<translation></translation>
13579+
</phrase>
13580+
13581+
<phrase>
13582+
<original>dynamic</original>
13583+
<translation></translation>
13584+
</phrase>
13585+
13586+
<phrase>
13587+
<original>static</original>
13588+
<translation></translation>
13589+
</phrase>
13590+
13591+
<!-- Effects_Edge_GradientFlow.frm contains 13 phrases. 5 were duplicates of existing phrases, so only 8 new phrases were written to file. -->
13592+
1354613593
<!-- Automatic text extraction complete. -->
1354713594

13548-
<phrasecount>2568</phrasecount>
13595+
<phrasecount>2577</phrasecount>
1354913596

13550-
<!-- As of this build, PhotoDemon contains 5123 phrases. -->
13551-
<!-- 2555 are duplicates, so only 2568 unique phrases have been written to file. -->
13552-
<!-- These 2568 phrases contain approximately 11907 total words. -->
13597+
<!-- As of this build, PhotoDemon contains 5138 phrases. -->
13598+
<!-- 2561 are duplicates, so only 2577 unique phrases have been written to file. -->
13599+
<!-- These 2577 phrases contain approximately 11920 total words. -->
1355313600

1355413601
</pdData>

0 commit comments

Comments
 (0)