gtk - GdkPixbuf can be created with `new_from_data` and `new_from_stream`. Why doesn't the latter require the resolution? -
i trying understand basics behind pixbuf
, factory methods new_from_data
, new_from_stream
.
new_from_data
requires string of bytes containing image data, , other information such bits per sample, , height of image.
what don't understand why new_from_stream
not require additional image information. then, how can pixbuf know how render image new_from_stream
not provide additional information other gio.inputstream
?
new_from_stream()
expects stream of supported image file, equivalent new_from_file()
. image formats contain metadata height , width.
new_from_data()
on other hand expects pixel buffer, array of pixels without metadata.
Comments
Post a Comment