![]() |
Paste "CF_JPEG"
Wie fügt man denn nochmal ein jpg aus der Zwischenablage ein. Try and Error?
Wäre schön gewesen: :-D
Delphi-Quellcode:
if Clipboard.HasFormat(CF_JPEG) then
APicture.LoadFromClipboardFormat(CF_JPEG, Clipboard.GetAsHandle(CF_JPEG), 0); |
AW: Paste "CF_JPEG"
Hilft Dir
![]() |
AW: Paste "CF_JPEG"
Sieht so als ob die wirklich alle Formate durchgehen?
|
AW: Paste "CF_JPEG"
Richtig. Sobald eins gefunden wird, mit dem TPicture etwas anfangen kann, wird die Grafik geladen und die Schleife verlassen.
|
AW: Paste "CF_JPEG"
Ok. Dann ergibt sich aber das nächste Problem. TPicture hat in D20007 keine property jpeg sondern nur Bitmap und Metafile. Wie komm ich denn bei jpg da an das Bild ran oder kann man da mit der Eigenschaft Graphic arbeiten z.B. FMetaFile.Draw(X, Y, FPicture.Graphic)?
|
AW: Paste "CF_JPEG"
Ja, funzt. D2007 braucht halt uses jpeg. Thanx!
|
AW: Paste "CF_JPEG"
Metafile macht er aber nicht? :wall:
Delphi-Quellcode:
var
Picture: TPicture; Bitmap: TBitmap; I: integer; AData: THandle; AFormat: Word; APalette: HPALETTE; begin Bitmap := TBitmap.Create; Picture := TPicture.Create; try for I := 0 to Clipboard.FormatCount - 1 do begin AFormat := Clipboard.Formats[I]; if Picture.SupportsClipboardFormat(AFormat) then begin AData := Clipboard.GetAsHandle(AFormat); APalette := Clipboard.GetAsHandle(CF_PALETTE); Picture.LoadFromClipboardFormat(AFormat, AData, APalette); // *** AV DrawPadStamp.PictureToLogo(Picture); Bitmap.Width := FThumbnailWidth; Bitmap.Height := FThumbnailHeight; Bitmap.Canvas.Brush.Color := clWhite; Bitmap.Canvas.FillRect(Rect(0, 0, Bitmap.Width, Bitmap.Height)); Bitmap.Canvas.StretchDraw(ThumbnailRect(Picture.Width, Picture.Height, FThumbnailWidth, FThumbnailHeight), DrawPadStamp.Logo); LogoImage.Picture.Assign(Bitmap); Break; end; end; finally; Bitmap.Free; Picture.Free; end; end; |
AW: Paste "CF_JPEG"
Was für eine AV das was, ist wohl geheim?
Wobei ein JPeg wohl keine Palette besitzt. - Wird Palette gefunden? - kann es sein, daß diese Palette nicht eigentlich z.B. zum CF_BITMAP gehört? (Bitmap, GIF usw.) |
AW: Paste "CF_JPEG"
Halt den Konvertierungsfehler von ClipBrd (EInvalidGraphic "Format der Zwischenablage wird nicht unterstützt"). BTW, das jpeg macht er (wohl) über bitmap?
|
AW: Paste "CF_JPEG"
Weißt du was am besten funzt?
-> Picture.Assign(Clipboard); :shock: |
Alle Zeitangaben in WEZ +1. Es ist jetzt 14:06 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz