1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
Rename to prevent conflict with png_image from libpng16
http://bugs.gentoo.org/464762
--- rwpng.c
+++ rwpng.c
@@ -213,7 +213,7 @@
}
-pngquant_error rwpng_write_image_init(png_image *mainprog_ptr, png_structpp png_ptr_p, png_infopp info_ptr_p, FILE *outfile)
+pngquant_error rwpng_write_image_init(rwpng_png_image *mainprog_ptr, png_structpp png_ptr_p, png_infopp info_ptr_p, FILE *outfile)
{
/* could also replace libpng warning-handler (final NULL), but no need: */
@@ -277,7 +277,7 @@
png_structp png_ptr;
png_infop info_ptr;
- pngquant_error retval = rwpng_write_image_init((png_image*)mainprog_ptr, &png_ptr, &info_ptr, outfile);
+ pngquant_error retval = rwpng_write_image_init((rwpng_png_image*)mainprog_ptr, &png_ptr, &info_ptr, outfile);
if (retval) return retval;
// Palette images generally don't gain anything from filtering
@@ -321,7 +321,7 @@
png_structp png_ptr;
png_infop info_ptr;
- pngquant_error retval = rwpng_write_image_init((png_image*)mainprog_ptr, &png_ptr, &info_ptr, outfile);
+ pngquant_error retval = rwpng_write_image_init((rwpng_png_image*)mainprog_ptr, &png_ptr, &info_ptr, outfile);
if (retval) return retval;
rwpng_set_gamma(info_ptr, png_ptr, mainprog_ptr->gamma);
@@ -344,7 +344,7 @@
static void rwpng_error_handler(png_structp png_ptr, png_const_charp msg)
{
- png_image *mainprog_ptr;
+ rwpng_png_image *mainprog_ptr;
/* This function, aside from the extra step of retrieving the "error
* pointer" (below) and the fact that it exists within the application
--- rwpng.h
+++ rwpng.h
@@ -80,7 +80,7 @@
jmp_buf jmpbuf;
png24_image png24;
png8_image png8;
-} png_image;
+} rwpng_png_image;
/* prototypes for public functions in rwpng.c */
|