From Xojo Documentation
|You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!|
Returns a platform-specific image handle.
Returns a platform-specific image handle that is the best match for drawing at the given resolution, using the same logic as Picture.BestRepresentation.
|The handle returned is a copy of the underlying data and will not be modified if the Picture itself is modified. Also, since it is a copy, it is your responsibility to release it using the proper OS API.|
|MacCGImage||A CGImageRef that you are responsible for releasing with CFRelease. Supported in macOS GUI applications.|
|WindowsBMP||A 32-bit HBITMAP that you are responsible for releasing with DeleteObject. Supported in Windows GUI applications.|
|WindowsICON||A 32-bit HICON that you are responsible for releasing with DeleteObject. Supported in Windows GUI applications.|
|LinuxGdkPixbuf||A 32-bit GdkPixbuf that you are responsible for releasing with g_object_unref. Supported in Linux GUI applications.|
|ConsoleGDImage||A gdImagePtr that you are responsible for releasing with gdFree. This requires the use of the libgd library. Supported in console applications (all platforms).|
|MacNSImage||An NSImage object that has been autoreleased, so an explicit release is not necessary. This is supported for all types of Pictures, including vector images. Supported in macOS GUI applications.|
The following code gets the CGImageRef from the Picture and properly releases it.