data = g_malloc_n (stride, texture->height);
gdk_texture_do_download (texture, format, data, stride);
- bytes = g_bytes_new_take (data, stride);
+ bytes = g_bytes_new_take (data, stride * texture->height);
result = gdk_memory_texture_new (texture->width,
texture->height,
format,
return g_bytes_get_data (self->bytes, NULL);
}
+GBytes *
+gdk_memory_texture_get_bytes (GdkMemoryTexture *self)
+{
+ return self->bytes;
+}
+
gsize
gdk_memory_texture_get_stride (GdkMemoryTexture *self)
{