|
LibGd 2.4.0-dev
GD Graphics library
|
Functions | |
| gdIOCtxPtr | gdNewFileCtx (FILE *) |
| Creates a new I/O context for reading/writing to a file. | |
| gdIOCtxPtr | gdNewDynamicCtx (int size, void *data) |
| Creates a new I/O context for reading/writing to a dynamic memory buffer. | |
| gdIOCtxPtr | gdNewDynamicCtxEx (int size, void *data, int freeFlag) |
| Creates a new I/O context for reading/writing to a dynamic memory buffer with control over memory management 2.0.21: if freeFlag is nonzero, gd will free and/or reallocate "data" as needed as described above. If freeFlag is zero, gd will never free or reallocate "data", which means that the context should only be used for reading an image from a memory buffer, or writing an image to a memory buffer which is already large enough. If the memory buffer is not large enough and an image write is attempted, the write operation will fail. Those wishing to write an image to a buffer in memory have a much simpler alternative in the gdImage[something]Ptr functions. | |
| gdIOCtxPtr | gdNewSSCtx (gdSourcePtr in, gdSinkPtr out) |
| gdIOCtxPtr gdNewDynamicCtx | ( | int | size, |
| void * | data | ||
| ) |
Creates a new I/O context for reading/writing to a dynamic memory buffer.
If data is null, size is ignored and an initial data buffer is allocated automatically. This function assumes gd has the right to free or reallocate "data" at will! Also note that gd will free "data" when the IO context is freed. If data is not null, it must point to memory allocated with gdMalloc, or by a call to gdImage[something]Ptr. If not, see gdNewDynamicCtxEx for an alternative.
| size | The initial size of the dynamic memory buffer. |
| data | A pointer to a memory buffer, or NULL to allocate a new buffer. |
| gdIOCtxPtr gdNewDynamicCtxEx | ( | int | size, |
| void * | data, | ||
| int | freeFlag | ||
| ) |
Creates a new I/O context for reading/writing to a dynamic memory buffer with control over memory management 2.0.21: if freeFlag is nonzero, gd will free and/or reallocate "data" as needed as described above. If freeFlag is zero, gd will never free or reallocate "data", which means that the context should only be used for reading an image from a memory buffer, or writing an image to a memory buffer which is already large enough. If the memory buffer is not large enough and an image write is attempted, the write operation will fail. Those wishing to write an image to a buffer in memory have a much simpler alternative in the gdImage[something]Ptr functions.
| size | The initial size of the dynamic memory buffer. |
| data | A pointer to a memory buffer, or NULL to allocate a new buffer. |
| freeFlag | A flag indicating whether gd should manage the memory of "data". If nonzero, gd will free and/or reallocate "data" as needed. If zero, gd will not free or reallocate "data". |
| gdIOCtxPtr gdNewFileCtx | ( | FILE * | f | ) |
Creates a new I/O context for reading/writing to a file.
returns a new I/O context for reading/writing to the specified file. The caller is responsible for closing the file when done.
| file | A pointer to a FILE object that identifies the file to be used for I/O. |
| gdIOCtxPtr gdNewSSCtx | ( | gdSourcePtr | in, |
| gdSinkPtr | out | ||
| ) |