Autor Beitrag
accessViolation
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 68

Win
Delphi 5 Enterpr.
BeitragVerfasst: Do 08.12.05 10:41 
Hallo!

Ich steuere meinen Scanner über Delphi an und bekomme TBitmaps, was auch funktioniert. Die TBitmaps möchte ich verkleinern (also Thumbnails erzeugen). Welche Komponente ist dazu geeignet? Ich habe mal was von Graphics32 gehört, geht das damit? Wenn ja, muß ich etwas besonderes beachten?
Die Thumbnails sollen evtl. später in Dateien gespeichert werden.

Hoffe, ihr könnt mir helfen :)

Gruß
Dietmar
arcardia
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 48



BeitragVerfasst: Fr 09.12.05 08:16 
Du musst 2 Bitmaps haben
einmal das "grosse" (in diesem Beispiel ScanBMP)
und das spätere Thumbnail (in diesem Fall ThumbBMP);


ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
W := 200;
H := 200;
ThumbBMP.width  :=W;
ThumbBMP.Height :=h;
SetStretchBltMode(ThumbBMP.Canvas.Handle, HALFTONE);
StretchBlt(ThumbBMP.Canvas.Handle, 0, 0, W, H, ScanBMP.Canvas.Handle, 0, 0, ScanBMP.Width, ScanBMP.Height, SRCCOPY);


Moderiert von user profile iconraziel: Code- durch Delphi-Tags ersetzt
accessViolation Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 68

Win
Delphi 5 Enterpr.
BeitragVerfasst: Fr 09.12.05 10:34 
Vielen Dank! Werd ich mir für's nächste mal merken, wenn ich mal einzelne Bilder verkleiner muß. Ich hab jetzt den TJvImagesViewer gefunden, der zeigt ein kpl. Verzeichnis mir Bildern als Thumbnails an und schreibt den Dateinamen drunter.
Gruß
dietmar