Zuschnitt als Regel statt als gespeichertes Bild
Die Sichtung merkt sich jetzt, WO der Vogel im Foto sitzt (vier Zahlen); die Anzeige schneidet daraus bei jedem Aufruf. Eine geaenderte Regel wirkt damit sofort auf den ganzen Bestand. Altbestand faellt auf das alte Bild zurueck.
This commit is contained in:
1 parent
f572c20080
commit
a97f066e92
14 files changed
+421
-19
No files matched your search
@@ -126,6 +126,11 @@ class Warteschlange:
|
||||
"votes": {g.species.slug: round(g.confidence, 4)
|
||||
for g in (result.guesses[:5] if result else [])},
|
||||
}
|
||||
# Wo der Vogel sitzt. Die Sammlung schneidet daraus selbst zu --
|
||||
# siehe web/dex/zuschnitt.py.
|
||||
if box is not None:
|
||||
nutzlast["box"] = [round(box.x0, 5), round(box.y0, 5),
|
||||
round(box.x1, 5), round(box.y1, 5)]
|
||||
dateien = {}
|
||||
if ausschnitt is not None:
|
||||
dateien["crop"] = ("crop.jpg", _encode(ausschnitt, 640), "image/jpeg")
|
||||
|
||||
Reference in new issue
Block a user