tags:

views:

11

answers:

1

Hello,

I load data with function:

gssize          g_input_stream_read    (GInputStream *stream,
                                        void *buffer, gsize count,
                                        GCancellable *cancellable,
                                        GError **error);

What is ma value of buffer parameter. How can I know what should be equal to buffer?

I make:

#define LOAD_BUFFER_SIZE 65536

But when i try to load image, only visible part of the image.

Thank you.

A: 

The buffer is a pointer to the memory you have allocated to contain what g_input_stream_read reads. It must be big enough to contain count bytes.

Could you expand this question, by showing with code samples how you are allocating the memory for buffer and how you called g_input_stream_read exactly?

Here is documentation on using g_input_stream_read.

Kim Reece