Back to index

plt-scheme  4.2.1
Defines | Functions
pngget.c File Reference
#include "png.h"

Go to the source code of this file.

Defines

#define PNG_INTERNAL

Functions

png_uint_32 PNGAPI png_get_valid (png_structp png_ptr, png_infop info_ptr, png_uint_32 flag)
png_uint_32 PNGAPI png_get_rowbytes (png_structp png_ptr, png_infop info_ptr)
png_bytepp PNGAPI png_get_rows (png_structp png_ptr, png_infop info_ptr)
png_uint_32 PNGAPI png_get_image_width (png_structp png_ptr, png_infop info_ptr)
png_uint_32 PNGAPI png_get_image_height (png_structp png_ptr, png_infop info_ptr)
png_byte PNGAPI png_get_bit_depth (png_structp png_ptr, png_infop info_ptr)
png_byte PNGAPI png_get_color_type (png_structp png_ptr, png_infop info_ptr)
png_byte PNGAPI png_get_filter_type (png_structp png_ptr, png_infop info_ptr)
png_byte PNGAPI png_get_interlace_type (png_structp png_ptr, png_infop info_ptr)
png_byte PNGAPI png_get_compression_type (png_structp png_ptr, png_infop info_ptr)
png_uint_32 PNGAPI png_get_x_pixels_per_meter (png_structp png_ptr, png_infop info_ptr)
png_uint_32 PNGAPI png_get_y_pixels_per_meter (png_structp png_ptr, png_infop info_ptr)
png_uint_32 PNGAPI png_get_pixels_per_meter (png_structp png_ptr, png_infop info_ptr)
float PNGAPI png_get_pixel_aspect_ratio (png_structp png_ptr, png_infop info_ptr)
png_int_32 PNGAPI png_get_x_offset_microns (png_structp png_ptr, png_infop info_ptr)
png_int_32 PNGAPI png_get_y_offset_microns (png_structp png_ptr, png_infop info_ptr)
png_int_32 PNGAPI png_get_x_offset_pixels (png_structp png_ptr, png_infop info_ptr)
png_int_32 PNGAPI png_get_y_offset_pixels (png_structp png_ptr, png_infop info_ptr)
png_byte PNGAPI png_get_channels (png_structp png_ptr, png_infop info_ptr)
png_bytep PNGAPI png_get_signature (png_structp png_ptr, png_infop info_ptr)
png_uint_32 PNGAPI png_get_bKGD (png_structp png_ptr, png_infop info_ptr, png_color_16p *background)
png_uint_32 PNGAPI png_get_cHRM (png_structp png_ptr, png_infop info_ptr, double *white_x, double *white_y, double *red_x, double *red_y, double *green_x, double *green_y, double *blue_x, double *blue_y)
png_uint_32 PNGAPI png_get_cHRM_fixed (png_structp png_ptr, png_infop info_ptr, png_fixed_point *white_x, png_fixed_point *white_y, png_fixed_point *red_x, png_fixed_point *red_y, png_fixed_point *green_x, png_fixed_point *green_y, png_fixed_point *blue_x, png_fixed_point *blue_y)
png_uint_32 PNGAPI png_get_gAMA (png_structp png_ptr, png_infop info_ptr, double *file_gamma)
png_uint_32 PNGAPI png_get_gAMA_fixed (png_structp png_ptr, png_infop info_ptr, png_fixed_point *int_file_gamma)
png_uint_32 PNGAPI png_get_sRGB (png_structp png_ptr, png_infop info_ptr, int *file_srgb_intent)
png_uint_32 PNGAPI png_get_iCCP (png_structp png_ptr, png_infop info_ptr, png_charpp name, int *compression_type, png_charpp profile, png_uint_32 *proflen)
png_uint_32 PNGAPI png_get_sPLT (png_structp png_ptr, png_infop info_ptr, png_sPLT_tpp spalettes)
png_uint_32 PNGAPI png_get_hIST (png_structp png_ptr, png_infop info_ptr, png_uint_16p *hist)
png_uint_32 PNGAPI png_get_IHDR (png_structp png_ptr, png_infop info_ptr, png_uint_32 *width, png_uint_32 *height, int *bit_depth, int *color_type, int *interlace_type, int *compression_type, int *filter_type)
png_uint_32 PNGAPI png_get_oFFs (png_structp png_ptr, png_infop info_ptr, png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type)
png_uint_32 PNGAPI png_get_pCAL (png_structp png_ptr, png_infop info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type, int *nparams, png_charp *units, png_charpp *params)
png_uint_32 PNGAPI png_get_sCAL (png_structp png_ptr, png_infop info_ptr, int *unit, double *width, double *height)
png_uint_32 PNGAPI png_get_pHYs (png_structp png_ptr, png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)
png_uint_32 PNGAPI png_get_PLTE (png_structp png_ptr, png_infop info_ptr, png_colorp *palette, int *num_palette)
png_uint_32 PNGAPI png_get_sBIT (png_structp png_ptr, png_infop info_ptr, png_color_8p *sig_bit)
png_uint_32 PNGAPI png_get_text (png_structp png_ptr, png_infop info_ptr, png_textp *text_ptr, int *num_text)
png_uint_32 PNGAPI png_get_tIME (png_structp png_ptr, png_infop info_ptr, png_timep *mod_time)
png_uint_32 PNGAPI png_get_tRNS (png_structp png_ptr, png_infop info_ptr, png_bytep *trans, int *num_trans, png_color_16p *trans_values)
png_uint_32 PNGAPI png_get_unknown_chunks (png_structp png_ptr, png_infop info_ptr, png_unknown_chunkpp unknowns)
png_byte PNGAPI png_get_rgb_to_gray_status (png_structp png_ptr)
png_voidp PNGAPI png_get_user_chunk_ptr (png_structp png_ptr)
png_uint_32 PNGAPI png_get_compression_buffer_size (png_structp png_ptr)
png_uint_32 PNGAPI png_get_asm_flags (png_structp png_ptr)
png_uint_32 PNGAPI png_get_asm_flagmask (int flag_select)
png_uint_32 PNGAPI png_get_mmx_flagmask (int flag_select, int *compilerID)
png_byte PNGAPI png_get_mmx_bitdepth_threshold (png_structp png_ptr)
png_uint_32 PNGAPI png_get_mmx_rowbytes_threshold (png_structp png_ptr)

Define Documentation

#define PNG_INTERNAL

Definition at line 11 of file pngget.c.


Function Documentation

Definition at line 849 of file pngget.c.

{
    png_uint_32 settable_asm_flags = 0;

    if (flag_select & PNG_SELECT_READ)
        settable_asm_flags |=
          PNG_ASM_FLAG_MMX_READ_COMBINE_ROW  |
          PNG_ASM_FLAG_MMX_READ_INTERLACE    |
          PNG_ASM_FLAG_MMX_READ_FILTER_SUB   |
          PNG_ASM_FLAG_MMX_READ_FILTER_UP    |
          PNG_ASM_FLAG_MMX_READ_FILTER_AVG   |
          PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ;
          /* no non-MMX flags yet */

#if 0
    /* GRR:  no write-flags yet, either, but someday... */
    if (flag_select & PNG_SELECT_WRITE)
        settable_asm_flags |=
          PNG_ASM_FLAG_MMX_WRITE_ [whatever] ;
#endif /* 0 */

    return settable_asm_flags;  /* _theoretically_ settable capabilities only */
}

Definition at line 842 of file pngget.c.

{
    return (png_uint_32)(png_ptr? png_ptr->asm_flags : 0L);
}
png_byte PNGAPI png_get_bit_depth ( png_structp  png_ptr,
png_infop  info_ptr 
)

Definition at line 66 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL)
   {
      return info_ptr->bit_depth;
   }
   return (0);
}
png_uint_32 PNGAPI png_get_bKGD ( png_structp  png_ptr,
png_infop  info_ptr,
png_color_16p background 
)

Definition at line 360 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_bKGD)
      && background != NULL)
   {
      png_debug1(1, "in %s retrieval function\n", "bKGD");
      *background = &(info_ptr->background);
      return (PNG_INFO_bKGD);
   }
   return (0);
}

Here is the caller graph for this function:

png_byte PNGAPI png_get_channels ( png_structp  png_ptr,
png_infop  info_ptr 
)

Definition at line 341 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL)
      return(info_ptr->channels);
   else
      return (0);
}
png_uint_32 PNGAPI png_get_cHRM ( png_structp  png_ptr,
png_infop  info_ptr,
double *  white_x,
double *  white_y,
double *  red_x,
double *  red_y,
double *  green_x,
double *  green_y,
double *  blue_x,
double *  blue_y 
)

Definition at line 377 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM))
   {
      png_debug1(1, "in %s retrieval function\n", "cHRM");
      if (white_x != NULL)
         *white_x = (double)info_ptr->x_white;
      if (white_y != NULL)
         *white_y = (double)info_ptr->y_white;
      if (red_x != NULL)
         *red_x = (double)info_ptr->x_red;
      if (red_y != NULL)
         *red_y = (double)info_ptr->y_red;
      if (green_x != NULL)
         *green_x = (double)info_ptr->x_green;
      if (green_y != NULL)
         *green_y = (double)info_ptr->y_green;
      if (blue_x != NULL)
         *blue_x = (double)info_ptr->x_blue;
      if (blue_y != NULL)
         *blue_y = (double)info_ptr->y_blue;
      return (PNG_INFO_cHRM);
   }
   return (0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

png_uint_32 PNGAPI png_get_cHRM_fixed ( png_structp  png_ptr,
png_infop  info_ptr,
png_fixed_point white_x,
png_fixed_point white_y,
png_fixed_point red_x,
png_fixed_point red_y,
png_fixed_point green_x,
png_fixed_point green_y,
png_fixed_point blue_x,
png_fixed_point blue_y 
)

Definition at line 407 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM))
   {
      png_debug1(1, "in %s retrieval function\n", "cHRM");
      if (white_x != NULL)
         *white_x = info_ptr->int_x_white;
      if (white_y != NULL)
         *white_y = info_ptr->int_y_white;
      if (red_x != NULL)
         *red_x = info_ptr->int_x_red;
      if (red_y != NULL)
         *red_y = info_ptr->int_y_red;
      if (green_x != NULL)
         *green_x = info_ptr->int_x_green;
      if (green_y != NULL)
         *green_y = info_ptr->int_y_green;
      if (blue_x != NULL)
         *blue_x = info_ptr->int_x_blue;
      if (blue_y != NULL)
         *blue_y = info_ptr->int_y_blue;
      return (PNG_INFO_cHRM);
   }
   return (0);
}

Here is the caller graph for this function:

Definition at line 76 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL)
   {
      return info_ptr->color_type;
   }
   return (0);
}

Definition at line 832 of file pngget.c.

{
   return (png_uint_32)(png_ptr? png_ptr->zbuf_size : 0L);
}

Definition at line 106 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL)
   {
      return info_ptr->compression_type;
   }
   return (0);
}

Definition at line 86 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL)
   {
      return info_ptr->filter_type;
   }
   return (0);
}
png_uint_32 PNGAPI png_get_gAMA ( png_structp  png_ptr,
png_infop  info_ptr,
double *  file_gamma 
)

Definition at line 441 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA)
      && file_gamma != NULL)
   {
      png_debug1(1, "in %s retrieval function\n", "gAMA");
      *file_gamma = (double)info_ptr->gamma;
      return (PNG_INFO_gAMA);
   }
   return (0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

png_uint_32 PNGAPI png_get_gAMA_fixed ( png_structp  png_ptr,
png_infop  info_ptr,
png_fixed_point int_file_gamma 
)

Definition at line 455 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA)
      && int_file_gamma != NULL)
   {
      png_debug1(1, "in %s retrieval function\n", "gAMA");
      *int_file_gamma = info_ptr->int_gamma;
      return (PNG_INFO_gAMA);
   }
   return (0);
}

Here is the caller graph for this function:

png_uint_32 PNGAPI png_get_hIST ( png_structp  png_ptr,
png_infop  info_ptr,
png_uint_16p hist 
)

Definition at line 520 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_hIST)
      && hist != NULL)
   {
      png_debug1(1, "in %s retrieval function\n", "hIST");
      *hist = info_ptr->hist;
      return (PNG_INFO_hIST);
   }
   return (0);
}

Here is the caller graph for this function:

png_uint_32 PNGAPI png_get_iCCP ( png_structp  png_ptr,
png_infop  info_ptr,
png_charpp  name,
int compression_type,
png_charpp  profile,
png_uint_32 proflen 
)

Definition at line 487 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_iCCP)
      && name != NULL && profile != NULL && proflen != NULL)
   {
      png_debug1(1, "in %s retrieval function\n", "iCCP");
      *name = info_ptr->iccp_name;
      *profile = info_ptr->iccp_profile;
      /* compression_type is a dummy so the API won't have to change
         if we introduce multiple compression types later. */
      *proflen = (int)info_ptr->iccp_proflen;
      *compression_type = (int)info_ptr->iccp_compression;
      return (PNG_INFO_iCCP);
   }
   return (0);
}

Here is the caller graph for this function:

png_uint_32 PNGAPI png_get_IHDR ( png_structp  png_ptr,
png_infop  info_ptr,
png_uint_32 width,
png_uint_32 height,
int bit_depth,
int color_type,
int interlace_type,
int compression_type,
int filter_type 
)

Definition at line 534 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL && width != NULL && height != NULL &&
      bit_depth != NULL && color_type != NULL)
   {
      int pixel_depth, channels;
      png_uint_32 rowbytes_per_pixel;

      png_debug1(1, "in %s retrieval function\n", "IHDR");
      *width = info_ptr->width;
      *height = info_ptr->height;
      *bit_depth = info_ptr->bit_depth;
      if (info_ptr->bit_depth < 1 || info_ptr->bit_depth > 16)
        png_error(png_ptr, "Invalid bit depth");
      *color_type = info_ptr->color_type;
      if (info_ptr->color_type > 6)
        png_error(png_ptr, "Invalid color type");
      if (compression_type != NULL)
         *compression_type = info_ptr->compression_type;
      if (filter_type != NULL)
         *filter_type = info_ptr->filter_type;
      if (interlace_type != NULL)
         *interlace_type = info_ptr->interlace_type;

      /* check for potential overflow of rowbytes */
      if (*color_type == PNG_COLOR_TYPE_PALETTE)
         channels = 1;
      else if (*color_type & PNG_COLOR_MASK_COLOR)
         channels = 3;
      else
         channels = 1;
      if (*color_type & PNG_COLOR_MASK_ALPHA)
         channels++;
      pixel_depth = *bit_depth * channels;
      rowbytes_per_pixel = (pixel_depth + 7) >> 3;
      if (width == 0 || *width > PNG_MAX_UINT)
        png_error(png_ptr, "Invalid image width");
      if (height == 0 || *height > PNG_MAX_UINT)
        png_error(png_ptr, "Invalid image height");
      if (*width > PNG_MAX_UINT/rowbytes_per_pixel - 64)
      {
         png_error(png_ptr,
            "Width too large for libpng to process image data.");
      }
      return (1);
   }
   return (0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 56 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL)
   {
      return info_ptr->height;
   }
   return (0);
}

Here is the caller graph for this function:

Definition at line 46 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL)
   {
      return info_ptr->width;
   }
   return (0);
}

Here is the caller graph for this function:

Definition at line 96 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL)
   {
      return info_ptr->interlace_type;
   }
   return (0);
}

Definition at line 915 of file pngget.c.

{
    return (png_byte)(png_ptr? png_ptr->mmx_bitdepth_threshold : 0);
}
png_uint_32 PNGAPI png_get_mmx_flagmask ( int  flag_select,
int compilerID 
)

Definition at line 879 of file pngget.c.

{
    png_uint_32 settable_mmx_flags = 0;

    if (flag_select & PNG_SELECT_READ)
        settable_mmx_flags |=
          PNG_ASM_FLAG_MMX_READ_COMBINE_ROW  |
          PNG_ASM_FLAG_MMX_READ_INTERLACE    |
          PNG_ASM_FLAG_MMX_READ_FILTER_SUB   |
          PNG_ASM_FLAG_MMX_READ_FILTER_UP    |
          PNG_ASM_FLAG_MMX_READ_FILTER_AVG   |
          PNG_ASM_FLAG_MMX_READ_FILTER_PAETH ;
#if 0
    /* GRR:  no MMX write support yet, but someday... */
    if (flag_select & PNG_SELECT_WRITE)
        settable_mmx_flags |=
          PNG_ASM_FLAG_MMX_WRITE_ [whatever] ;
#endif /* 0 */

    if (compilerID != NULL) {
#ifdef PNG_USE_PNGVCRD
        *compilerID = 1;    /* MSVC */
#else
#ifdef PNG_USE_PNGGCCRD
        *compilerID = 2;    /* gcc/gas */
#else
        *compilerID = -1;   /* unknown (i.e., no asm/MMX code compiled) */
#endif
#endif
    }

    return settable_mmx_flags;  /* _theoretically_ settable capabilities only */
}

Definition at line 922 of file pngget.c.

{
    return (png_uint_32)(png_ptr? png_ptr->mmx_rowbytes_threshold : 0L);
}
png_uint_32 PNGAPI png_get_oFFs ( png_structp  png_ptr,
png_infop  info_ptr,
png_int_32 offset_x,
png_int_32 offset_y,
int unit_type 
)

Definition at line 589 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)
      && offset_x != NULL && offset_y != NULL && unit_type != NULL)
   {
      png_debug1(1, "in %s retrieval function\n", "oFFs");
      *offset_x = info_ptr->x_offset;
      *offset_y = info_ptr->y_offset;
      *unit_type = (int)info_ptr->offset_unit_type;
      return (PNG_INFO_oFFs);
   }
   return (0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

png_uint_32 PNGAPI png_get_pCAL ( png_structp  png_ptr,
png_infop  info_ptr,
png_charp purpose,
png_int_32 X0,
png_int_32 X1,
int type,
int nparams,
png_charp units,
png_charpp params 
)

Definition at line 607 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pCAL)
      && purpose != NULL && X0 != NULL && X1 != NULL && type != NULL &&
      nparams != NULL && units != NULL && params != NULL)
   {
      png_debug1(1, "in %s retrieval function\n", "pCAL");
      *purpose = info_ptr->pcal_purpose;
      *X0 = info_ptr->pcal_X0;
      *X1 = info_ptr->pcal_X1;
      *type = (int)info_ptr->pcal_type;
      *nparams = (int)info_ptr->pcal_nparams;
      *units = info_ptr->pcal_units;
      *params = info_ptr->pcal_params;
      return (PNG_INFO_pCAL);
   }
   return (0);
}

Here is the caller graph for this function:

png_uint_32 PNGAPI png_get_pHYs ( png_structp  png_ptr,
png_infop  info_ptr,
png_uint_32 res_x,
png_uint_32 res_y,
int unit_type 
)

Definition at line 667 of file pngget.c.

{
   png_uint_32 retval = 0;

   if (png_ptr != NULL && info_ptr != NULL &&
      (info_ptr->valid & PNG_INFO_pHYs))
   {
      png_debug1(1, "in %s retrieval function\n", "pHYs");
      if (res_x != NULL)
      {
         *res_x = info_ptr->x_pixels_per_unit;
         retval |= PNG_INFO_pHYs;
      }
      if (res_y != NULL)
      {
         *res_y = info_ptr->y_pixels_per_unit;
         retval |= PNG_INFO_pHYs;
      }
      if (unit_type != NULL)
      {
         *unit_type = (int)info_ptr->phys_unit_type;
         retval |= PNG_INFO_pHYs;
      }
   }
   return (retval);
}

Here is the caller graph for this function:

float PNGAPI png_get_pixel_aspect_ratio ( png_structp  png_ptr,
png_infop  info_ptr 
)

Definition at line 172 of file pngget.c.

   {
   if (png_ptr != NULL && info_ptr != NULL)
#if defined(PNG_pHYs_SUPPORTED)
   if (info_ptr->valid & PNG_INFO_pHYs)
   {
      png_debug1(1, "in %s retrieval function\n", "png_get_aspect_ratio");
      if (info_ptr->x_pixels_per_unit == 0)
         return ((float)0.0);
      else
         return ((float)((float)info_ptr->y_pixels_per_unit
            /(float)info_ptr->x_pixels_per_unit));
   }
#else
   return (0.0);
#endif
   return ((float)0.0);
}

Definition at line 152 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL)
#if defined(PNG_pHYs_SUPPORTED)
   if (info_ptr->valid & PNG_INFO_pHYs)
   {
      png_debug1(1, "in %s retrieval function\n", "png_get_pixels_per_meter");
      if(info_ptr->phys_unit_type != PNG_RESOLUTION_METER ||
         info_ptr->x_pixels_per_unit != info_ptr->y_pixels_per_unit)
          return (0);
      else return (info_ptr->x_pixels_per_unit);
   }
#else
   return (0);
#endif
   return (0);
}
png_uint_32 PNGAPI png_get_PLTE ( png_structp  png_ptr,
png_infop  info_ptr,
png_colorp palette,
int num_palette 
)

Definition at line 697 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_PLTE)
       && palette != NULL)
   {
      png_debug1(1, "in %s retrieval function\n", "PLTE");
      *palette = info_ptr->palette;
      *num_palette = info_ptr->num_palette;
      png_debug1(3, "num_palette = %d\n", *num_palette);
      return (PNG_INFO_PLTE);
   }
   return (0);
}

Here is the caller graph for this function:

Definition at line 816 of file pngget.c.

{
   return (png_byte)(png_ptr? png_ptr->rgb_to_gray_status : 0);
}

Definition at line 24 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL)
      return(info_ptr->rowbytes);
   else
      return(0);
}

Here is the caller graph for this function:

png_bytepp PNGAPI png_get_rows ( png_structp  png_ptr,
png_infop  info_ptr 
)

Definition at line 34 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL)
      return(info_ptr->row_pointers);
   else
      return(0);
}
png_uint_32 PNGAPI png_get_sBIT ( png_structp  png_ptr,
png_infop  info_ptr,
png_color_8p sig_bit 
)

Definition at line 714 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_sBIT)
      && sig_bit != NULL)
   {
      png_debug1(1, "in %s retrieval function\n", "sBIT");
      *sig_bit = &(info_ptr->sig_bit);
      return (PNG_INFO_sBIT);
   }
   return (0);
}

Here is the caller graph for this function:

png_uint_32 PNGAPI png_get_sCAL ( png_structp  png_ptr,
png_infop  info_ptr,
int unit,
double *  width,
double *  height 
)

Definition at line 632 of file pngget.c.

{
    if (png_ptr != NULL && info_ptr != NULL &&
       (info_ptr->valid & PNG_INFO_sCAL))
    {
        *unit = info_ptr->scal_unit;
        *width = info_ptr->scal_pixel_width;
        *height = info_ptr->scal_pixel_height;
        return (PNG_INFO_sCAL);
    }
    return(0);
}

Here is the caller graph for this function:

Definition at line 350 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL)
      return(info_ptr->signature);
   else
      return (NULL);
}
png_uint_32 PNGAPI png_get_sPLT ( png_structp  png_ptr,
png_infop  info_ptr,
png_sPLT_tpp  spalettes 
)

Definition at line 509 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL && spalettes != NULL)
     *spalettes = info_ptr->splt_palettes;
   return ((png_uint_32)info_ptr->splt_palettes_num);
}
png_uint_32 PNGAPI png_get_sRGB ( png_structp  png_ptr,
png_infop  info_ptr,
int file_srgb_intent 
)

Definition at line 472 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_sRGB)
      && file_srgb_intent != NULL)
   {
      png_debug1(1, "in %s retrieval function\n", "sRGB");
      *file_srgb_intent = (int)info_ptr->srgb_intent;
      return (PNG_INFO_sRGB);
   }
   return (0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

png_uint_32 PNGAPI png_get_text ( png_structp  png_ptr,
png_infop  info_ptr,
png_textp text_ptr,
int num_text 
)

Definition at line 729 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL && info_ptr->num_text > 0)
   {
      png_debug1(1, "in %s retrieval function\n",
         (png_ptr->chunk_name[0] == '\0' ? "text"
             : (png_const_charp)png_ptr->chunk_name));
      if (text_ptr != NULL)
         *text_ptr = info_ptr->text;
      if (num_text != NULL)
         *num_text = info_ptr->num_text;
      return ((png_uint_32)info_ptr->num_text);
   }
   if (num_text != NULL)
     *num_text = 0;
   return(0);
}

Here is the caller graph for this function:

png_uint_32 PNGAPI png_get_tIME ( png_structp  png_ptr,
png_infop  info_ptr,
png_timep mod_time 
)

Definition at line 751 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_tIME)
       && mod_time != NULL)
   {
      png_debug1(1, "in %s retrieval function\n", "tIME");
      *mod_time = &(info_ptr->mod_time);
      return (PNG_INFO_tIME);
   }
   return (0);
}

Here is the caller graph for this function:

png_uint_32 PNGAPI png_get_tRNS ( png_structp  png_ptr,
png_infop  info_ptr,
png_bytep trans,
int num_trans,
png_color_16p trans_values 
)

Definition at line 766 of file pngget.c.

{
   png_uint_32 retval = 0;
   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS))
   {
      png_debug1(1, "in %s retrieval function\n", "tRNS");
      if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
      {
          if (trans != NULL)
          {
             *trans = info_ptr->trans;
             retval |= PNG_INFO_tRNS;
          }
          if (trans_values != NULL)
             *trans_values = &(info_ptr->trans_values);
      }
      else /* if (info_ptr->color_type != PNG_COLOR_TYPE_PALETTE) */
      {
          if (trans_values != NULL)
          {
             *trans_values = &(info_ptr->trans_values);
             retval |= PNG_INFO_tRNS;
          }
          if(trans != NULL)
             *trans = NULL;
      }
      if(num_trans != NULL)
      {
         *num_trans = info_ptr->num_trans;
         retval |= PNG_INFO_tRNS;
      }
   }
   return (retval);
}

Here is the caller graph for this function:

Definition at line 805 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL && unknowns != NULL)
     *unknowns = info_ptr->unknown_chunks;
   return ((png_uint_32)info_ptr->unknown_chunks_num);
}

Here is the caller graph for this function:

Definition at line 824 of file pngget.c.

{
   return (png_ptr? png_ptr->user_chunk_ptr : NULL);
}
png_uint_32 PNGAPI png_get_valid ( png_structp  png_ptr,
png_infop  info_ptr,
png_uint_32  flag 
)

Definition at line 15 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL)
      return(info_ptr->valid & flag);
   else
      return(0);
}

Here is the caller graph for this function:

Definition at line 193 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL)
#if defined(PNG_oFFs_SUPPORTED)
   if (info_ptr->valid & PNG_INFO_oFFs)
   {
      png_debug1(1, "in %s retrieval function\n", "png_get_x_offset_microns");
      if(info_ptr->offset_unit_type != PNG_OFFSET_MICROMETER)
          return (0);
      else return (info_ptr->x_offset);
   }
#else
   return (0);
#endif
   return (0);
}

Definition at line 229 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL)
#if defined(PNG_oFFs_SUPPORTED)
   if (info_ptr->valid & PNG_INFO_oFFs)
   {
      png_debug1(1, "in %s retrieval function\n", "png_get_x_offset_microns");
      if(info_ptr->offset_unit_type != PNG_OFFSET_PIXEL)
          return (0);
      else return (info_ptr->x_offset);
   }
#else
   return (0);
#endif
   return (0);
}

Definition at line 116 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL)
#if defined(PNG_pHYs_SUPPORTED)
   if (info_ptr->valid & PNG_INFO_pHYs)
   {
      png_debug1(1, "in %s retrieval function\n", "png_get_x_pixels_per_meter");
      if(info_ptr->phys_unit_type != PNG_RESOLUTION_METER)
          return (0);
      else return (info_ptr->x_pixels_per_unit);
   }
#else
   return (0);
#endif
   return (0);
}

Definition at line 211 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL)
#if defined(PNG_oFFs_SUPPORTED)
   if (info_ptr->valid & PNG_INFO_oFFs)
   {
      png_debug1(1, "in %s retrieval function\n", "png_get_y_offset_microns");
      if(info_ptr->offset_unit_type != PNG_OFFSET_MICROMETER)
          return (0);
      else return (info_ptr->y_offset);
   }
#else
   return (0);
#endif
   return (0);
}

Definition at line 247 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL)
#if defined(PNG_oFFs_SUPPORTED)
   if (info_ptr->valid & PNG_INFO_oFFs)
   {
      png_debug1(1, "in %s retrieval function\n", "png_get_y_offset_microns");
      if(info_ptr->offset_unit_type != PNG_OFFSET_PIXEL)
          return (0);
      else return (info_ptr->y_offset);
   }
#else
   return (0);
#endif
   return (0);
}

Definition at line 134 of file pngget.c.

{
   if (png_ptr != NULL && info_ptr != NULL)
#if defined(PNG_pHYs_SUPPORTED)
   if (info_ptr->valid & PNG_INFO_pHYs)
   {
      png_debug1(1, "in %s retrieval function\n", "png_get_y_pixels_per_meter");
      if(info_ptr->phys_unit_type != PNG_RESOLUTION_METER)
          return (0);
      else return (info_ptr->y_pixels_per_unit);
   }
#else
   return (0);
#endif
   return (0);
}