I wanted to know whatkind of object I have in the code below, but the debugger says:
Picture ImmutableBitmap = 3
Used code:
[code]Dim Clip As New Clipboard
If Clip.PictureAvailable Then // Break Point set here
If Clip.RawDataAvailable(“public.png”) Then[/code]
I have searched the LR and found:
http://documentation.xojo.com/api/graphics/picture.html#picture-type
But no explanation for the Integer value (here: 3).
I know (because I checked with AppleScrips) I have a png Class in the Clipboard.
Why did I searched ? Because the pasted image holds:
{{TIFF picture, 30022}, {«class 8BPS», 309676}, {GIF picture, 20599}, {«class jp2 », 26308}, {JPEG picture, 15824}, {«class PNGf», 39933}, {«class BMP », 1069034}, {«class TPIC», 240586}}
and I get an UnsupportedOperationException while using RGBSurface (elsewhere in the Project). The file loaded from disk does not behave this Exception. So, I suppose Xojo gets the images first Class (a TIFF image), so I directed my code to get the png Class image instead (a bit more complex to get).
The message I get is:
[b]An exception of class UnsupportedOperationException was not handled. The application must shut down.[/b]
Exception Message: Cannot modify a read-only image