summaryrefslogtreecommitdiff
path: root/graphics/gtksee/patches/patch-src_detect.c
blob: 6f3bc7b35e7a5a830ffcac5d2bb8ac808dcac6d0 (plain)
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
$NetBSD: patch-src_detect.c,v 1.2 2011/02/14 19:16:14 wiz Exp $

Fix build with png-1.5.
http://developer.berlios.de/patch/?func=detailpatch&patch_id=3131&group_id=735

--- src/detect.c.orig	2004-02-14 15:16:33.000000000 +0000
+++ src/detect.c
@@ -119,14 +119,16 @@ static gboolean
 detect_png(guchar *filename, ImageInfo *info)
 {
 #ifdef HAVE_LIBPNG
-   png_info pnginfo;
+   gint width;
+   gint height;
+   png_byte color_type;
 
-   if (png_get_header(filename, &pnginfo))
+   if (png_get_header(filename, &width, &height, &color_type))
    {
       info->type = PNG;
-      info->width = pnginfo.width;
-      info->height = pnginfo.height;
-      switch (pnginfo.color_type)
+      info->width = width;
+      info->height = height;
+      switch (color_type)
       {
          case PNG_COLOR_TYPE_RGB :
             info->ncolors = 24;