summaryrefslogtreecommitdiff
path: root/Build/source/libs/gd/libgd-src/src/gd_png.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/gd/libgd-src/src/gd_png.c')
-rw-r--r--Build/source/libs/gd/libgd-src/src/gd_png.c58
1 files changed, 34 insertions, 24 deletions
diff --git a/Build/source/libs/gd/libgd-src/src/gd_png.c b/Build/source/libs/gd/libgd-src/src/gd_png.c
index ab93e4347ce..db8de725ec1 100644
--- a/Build/source/libs/gd/libgd-src/src/gd_png.c
+++ b/Build/source/libs/gd/libgd-src/src/gd_png.c
@@ -42,6 +42,12 @@
---------------------------------------------------------------------------*/
+/**
+ * File: PNG IO
+ *
+ * Read and write PNG images.
+ */
+
#ifdef PNG_SETJMP_SUPPORTED
typedef struct _jmpbuf_wrapper {
jmp_buf jmpbuf;
@@ -143,16 +149,18 @@ gdPngFlushData (png_structp png_ptr)
A pointer to the new image or NULL if an error occurred.
Example:
-
- > gdImagePtr im;
- > ... inside a function ...
- > FILE *in;
- > in = fopen("mypng.png", "rb");
- > im = gdImageCreateFromPng(in);
- > fclose(in);
- > // ... Use the image ...
- > gdImageDestroy(im);
-
+ (start code)
+
+ gdImagePtr im;
+ ... inside a function ...
+ FILE *in;
+ in = fopen("mypng.png", "rb");
+ im = gdImageCreateFromPng(in);
+ fclose(in);
+ // ... Use the image ...
+ gdImageDestroy(im);
+
+ (end code)
*/
BGD_DECLARE(gdImagePtr) gdImageCreateFromPng (FILE * inFile)
{
@@ -579,20 +587,22 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromPngCtx (gdIOCtx * infile)
Nothing.
Example:
-
- > gdImagePtr im;
- > int black, white;
- > FILE *out;
- >
- > im = gdImageCreate(100, 100); // Create the image
- > white = gdImageColorAllocate(im, 255, 255, 255); // Alloc background
- > black = gdImageColorAllocate(im, 0, 0, 0); // Allocate drawing color
- > gdImageRectangle(im, 0, 0, 99, 99, black); // Draw rectangle
- > out = fopen("rect.png", "wb"); // Open output file (binary)
- > gdImagePngEx(im, out, 9); // Write PNG, max compression
- > fclose(out); // Close file
- > gdImageDestroy(im); // Destroy image
-
+ (start code)
+
+ gdImagePtr im;
+ int black, white;
+ FILE *out;
+
+ im = gdImageCreate(100, 100); // Create the image
+ white = gdImageColorAllocate(im, 255, 255, 255); // Alloc background
+ black = gdImageColorAllocate(im, 0, 0, 0); // Allocate drawing color
+ gdImageRectangle(im, 0, 0, 99, 99, black); // Draw rectangle
+ out = fopen("rect.png", "wb"); // Open output file (binary)
+ gdImagePngEx(im, out, 9); // Write PNG, max compression
+ fclose(out); // Close file
+ gdImageDestroy(im); // Destroy image
+
+ (end code)
*/
BGD_DECLARE(void) gdImagePngEx (gdImagePtr im, FILE * outFile, int level)
{