Cocoa unable to paste image when it was copied in another app
Original Reporter info from Mantis: dbannon @davidbannon
-
Reporter name: David
Original Reporter info from Mantis: dbannon @davidbannon
- Reporter name: David
Description:
In Cocoa, when the clipboard contains an image copied from another application, the normal questions about "do you have an image" are always answered false.
It seems that Cocoa offers image formats (from its clipboard) that Lazarus either cannot handle or does not recognise : public.html; Apple HTML pasteboard type; public.tiff; NeXT TIFF v4.0 pasteboard type. My attempts to force a load anyway seemed to end in tears ....
Carbon works fine. And an internally copied picture (reported as being image/bmp is identified as an image) works fine.
Steps to reproduce:
Run up the attached demo, build with fixes or trunk, copy an image from a webpage and then go back to the app, click the info button. I expect you will see HasPictureFormat; FindPictureFormatID; HasFormat(CF_PICTURE) - return false, 0 and false. But image formats are listed as available, just not ones Lazarus knows about. I think ...
And you cannot paste that picture with the paste button.
Additional information:
Discussed here https://forum.lazarus.freepascal.org/index.php/topic,44053.msg309289.html#msg309289
superficially, this sounds a bit like #34840 (closed) but it is quite unrelated.
Mantis conversion info:
- Mantis ID: 34960
- OS: MacOS
- OS Build: Sierra
- Build: 60228
- Platform: Mac
- Version: 2.0RC3
- Fixed in revision: 61472 (#8ca71151)
- Monitored by: » @davidbannon (David)