[xiph-commits] r15340 - trunk/pngxpdf

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Wed Sep 24 20:58:27 PDT 2008


Author: xiphmont
Date: 2008-09-24 20:58:26 -0700 (Wed, 24 Sep 2008)
New Revision: 15340

Modified:
   trunk/pngxpdf/main.c
Log:
Add more detailed error message on failed image load


Modified: trunk/pngxpdf/main.c
===================================================================
--- trunk/pngxpdf/main.c	2008-09-23 22:45:24 UTC (rev 15339)
+++ trunk/pngxpdf/main.c	2008-09-25 03:58:26 UTC (rev 15340)
@@ -145,8 +145,9 @@
     char *filename = argv[optind];
     cairo_pattern_t *pattern;
     cairo_surface_t *ps=cairo_image_surface_create_from_png(filename);
-    if(!ps || cairo_surface_status(ps)!=CAIRO_STATUS_SUCCESS){
-      fprintf(stderr,"CAIRO ERROR: Unable to load PNG file %s.\n\n",filename);
+    cairo_status_t status = cairo_surface_status(ps);
+    if(!ps || status!=CAIRO_STATUS_SUCCESS){
+      fprintf(stderr,"CAIRO ERROR: Unable to load PNG file %s: %s\n\n",filename,cairo_status_to_string(status));
       exit(1);
     }
     ww = cairo_image_surface_get_width(ps);



More information about the commits mailing list