Package: gdk
Function gdk:texture-save-to-png-bytes
Lambda Listgdk:texture-save-to-png-bytes (texture) ArgumentsReturn ValueA newly allocated g:bytes instance containing PNG data. Details
Store the given texture in memory as a PNG file. Use the gdk:texture-new-from-bytes function to read it back. If you want to serialize a texture, this is a convenient and portable way to do that. If you need more control over the generated image, such as attaching metadata, you should look into an image handling library such as the GdkPixbuf library. If you are dealing with high dynamic range float data, you might also want to consider the gdk:texture-save-to-tiff-bytes function instead. Since 4.6 | See also |
#2023-5-25