new image url

This commit is contained in:
Andreas Knuth 2024-11-30 20:55:44 +01:00
parent b43044a0dd
commit fb75113a08
2 changed files with 3 additions and 2 deletions

View File

@ -31,9 +31,10 @@
<!-- Liste der Bilder mit Anzahl der Boxen und Icons -->
<ul class="mb-4">
<li *ngFor="let image of deck.images" class="flex justify-between items-center py-2 border-b last:border-b-0">
<div>
<div class="flex items-center">
<span class="font-medium">{{ image.name }}</span>
<span class="text-gray-600">({{ image.boxes.length }} Boxen)</span>
<img src="/api/debug_image/{{image.id}}/thumbnail.jpg">
</div>
<div class="flex space-x-2">
<!-- Edit Icon -->

View File

@ -64,7 +64,7 @@ export class TrainingComponent implements OnInit {
if (!ctx || !this.currentImageData) return;
const img = new Image();
img.src = `/api/debug_image/${this.currentImageData.id}`;
img.src = `/api/debug_image/${this.currentImageData.id}/original_compressed.jpg`;
img.onload = () => {
// Set canvas size to image size
canvas.width = img.width;