int GrQueryPng( char *pngfn, int *width, int *height ) { FILE *f; int r; f = fopen( pngfn,"rb" ); if( f == NULL ) return -1; r = querypng( f,width,height ); fclose( f ); return r; }
/** * grx_query_png_file: * @filename: (type filename): Name of jpeg file * @width: (out): return pnm width * @height: (out): return pnm height * * Query width and height data from a PNG file * * Returns: %TRUE on success, otherwise %FALSE */ gboolean grx_query_png_file(const char *pngfn, int *width, int *height) { FILE *f; int r; f = fopen( pngfn,"rb" ); if (f == NULL) { return FALSE; } r = querypng( f,width,height ); fclose( f ); return r; }