Crop thumbnail to vehicle area instead of full frame
When a plate bbox is detected, the snapshot thumbnail is now cropped around the vehicle (plate bbox + generous margins) and resized to ≤1280px wide. This makes the grid on the index page much more useful. The full best frame is saved separately as best_frame.jpg and used as the main image in the event detail view. Without a plate bbox, fallback crops the center 80% of the frame. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
00368fba0d
commit
31bb5d86c6
@@ -117,9 +117,9 @@
|
||||
|
||||
<div class="md:col-span-2 card overflow-hidden">
|
||||
<div class="bg-black relative cursor-zoom-in" style="aspect-ratio:16/9;"
|
||||
onclick="openLightbox('/{{ ev.snapshot_path }}', 'Meilleure frame ★')">
|
||||
onclick="openLightbox('/{{ best_frame_path }}', 'Meilleure frame ★')">
|
||||
<img id="main-img"
|
||||
src="{% if ev.snapshot_path %}/{{ ev.snapshot_path }}{% endif %}"
|
||||
src="{% if best_frame_path %}/{{ best_frame_path }}{% endif %}"
|
||||
class="w-full h-full object-contain">
|
||||
<span class="absolute bottom-2 right-2 text-xs text-slate-500">🔍 cliquer pour agrandir</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user