Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Multimedia (https://www.delphipraxis.net/16-multimedia/)
-   -   Delphi TJPEGImage.LoadFromClipboardFormat (https://www.delphipraxis.net/117693-tjpegimage-loadfromclipboardformat.html)

Peinhard 23. Jul 2008 16:12


TJPEGImage.LoadFromClipboardFormat
 
In der Hilfe heisst es zu besagter Prozedur: "LoadFromClipboardFormat can also recognize, and supports, a bitmap format on the Clipboard."

Ein Aufruf mit

Delphi-Quellcode:
Jpeg.LoadFromClipBoardFormat(CF_BITMAP,ClipBoard.GetAsHandle(CF_BITMAP),0)
verursacht bei mir allerdings eine Schutzverletzung. Natürlich kann ich das auch mit TBitmap, dessen LoadFromClipBoardFormat und anschliessendem Jpeg.Assign machen - trotzdem wurmt es mich. Weiss jemand, warum es knallt bzw was man machen muss, dass nicht?

turboPASCAL 23. Jul 2008 18:46

Re: TJPEGImage.LoadFromClipboardFormat
 
Japp, weil ein Bitmap nun mal kein JPEG ist.

Du musst die erst das im Clpbrd. enthaltene Bitmap in eine eigene Variable laden und
dann in ein PJPG-icture umwandeln.

E'h ich mir einen Wolf schreibe:
http://www.swissdelphicenter.ch/torr...ode.php?id=874

Peinhard 25. Jul 2008 09:32

Re: TJPEGImage.LoadFromClipboardFormat
 
Danke - aber der 'Umweg' war mir wie gesagt bekannt. Bleibt die Frage, ob die OLH hier schlichtweg falsch ist oder ob es doch einen gültigen Aufruf von LoadFromClipboardFormat gibt, der Bitmaps auch direkt ansprechen kann.


Alle Zeitangaben in WEZ +1. Es ist jetzt 14:03 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz