예제 #1
0
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;
}
예제 #2
0
파일: png2ctx.c 프로젝트: ev3dev/grx
/**
 * 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;
}