Method

GdkTextureDownloaderdownload_bytes

since: 4.10

Declaration [src]

GBytes*
gdk_texture_downloader_download_bytes (
  const GdkTextureDownloader* self,
  gsize* out_stride
)

Description [src]

Downloads the given texture pixels into a GBytes. The rowstride will be stored in the stride value.

This function will abort if it tries to download a large texture and fails to allocate memory. If you think that may happen, you should handle memory allocation yourself and use gdk_texture_downloader_download_into() once allocation succeeded.

Available since: 4.10

Parameters

out_stride

Type: gsize*

The stride of the resulting data in bytes.

The argument will be set by the function.

Return value

Type: GBytes

The downloaded pixels.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.