Aktueller Stand
This commit is contained in:
@@ -42,6 +42,7 @@ export class UploadImageModalComponent implements AfterViewInit, OnDestroy {
|
||||
modal:any;
|
||||
originalImageWidth:number|undefined;
|
||||
originalImageHeight:number|undefined;
|
||||
imagename:string|undefined|null;
|
||||
constructor(private deckService: DeckService, private http: HttpClient) { }
|
||||
|
||||
ngAfterViewInit(): void {
|
||||
@@ -135,6 +136,7 @@ export class UploadImageModalComponent implements AfterViewInit, OnDestroy {
|
||||
}
|
||||
|
||||
// Bildverarbeitung im Frontend durchführen
|
||||
this.imagename = (response.results && response.results.length>0)?response.results[0].name:null;
|
||||
await this.processImage(response.results);
|
||||
} catch (error) {
|
||||
console.error('Fehler beim OCR-Service:', error);
|
||||
@@ -313,12 +315,10 @@ export class UploadImageModalComponent implements AfterViewInit, OnDestroy {
|
||||
save(): void {
|
||||
// Hier kannst du die Logik zum Speichern der Bilddaten implementieren
|
||||
// Zum Beispiel:
|
||||
/*
|
||||
const data = {
|
||||
deckName: this.deckName,
|
||||
image: this.originalImageSrc,
|
||||
deckname: this.deckName,
|
||||
image: this.imagename,
|
||||
boxes: this.boxes,
|
||||
detectedText: this.detectedText
|
||||
};
|
||||
this.deckService.saveImageData(data).subscribe({
|
||||
next: () => {
|
||||
@@ -331,7 +331,6 @@ export class UploadImageModalComponent implements AfterViewInit, OnDestroy {
|
||||
alert('Fehler beim Speichern des Bildes.');
|
||||
}
|
||||
});
|
||||
*/
|
||||
// Temporäres Beispiel:
|
||||
alert('Save button clicked');
|
||||
this.imageUploaded.emit();
|
||||
|
||||
Reference in New Issue
Block a user