当前位置: 首页>>代码示例>>C++>>正文


C++ png_debug1函数代码示例

本文整理汇总了C++中png_debug1函数的典型用法代码示例。如果您正苦于以下问题:C++ png_debug1函数的具体用法?C++ png_debug1怎么用?C++ png_debug1使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了png_debug1函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: png_set_oFFs

void PNGAPI
png_set_oFFs(png_const_structrp png_ptr, png_inforp info_ptr,
    png_int_32 offset_x, png_int_32 offset_y, int unit_type)
{
   png_debug1(1, "in %s storage function", "oFFs");

   if (png_ptr == NULL || info_ptr == NULL)
      return;

   info_ptr->x_offset = offset_x;
   info_ptr->y_offset = offset_y;
   info_ptr->offset_unit_type = (png_byte)unit_type;
   info_ptr->valid |= PNG_INFO_oFFs;
}
开发者ID:7heaven,项目名称:Flakor,代码行数:14,代码来源:pngset.c

示例2: png_set_pHYs

void PNGAPI
png_set_pHYs(png_const_structrp png_ptr, png_inforp info_ptr,
    png_uint_32 res_x, png_uint_32 res_y, int unit_type)
{
   png_debug1(1, "in %s storage function", "pHYs");

   if (png_ptr == NULL || info_ptr == NULL)
      return;

   info_ptr->x_pixels_per_unit = res_x;
   info_ptr->y_pixels_per_unit = res_y;
   info_ptr->phys_unit_type = (png_byte)unit_type;
   info_ptr->valid |= PNG_INFO_pHYs;
}
开发者ID:7heaven,项目名称:Flakor,代码行数:14,代码来源:pngset.c

示例3: png_set_rows

void PNGAPI
png_set_rows(png_structp png_ptr, png_infop info_ptr, png_bytepp row_pointers)
{
   png_debug1(1, "in %s storage function\n", "rows");

   if (png_ptr == NULL || info_ptr == NULL)
      return;

   if(info_ptr->row_pointers && (info_ptr->row_pointers != row_pointers))
      png_free_data(png_ptr, info_ptr, PNG_FREE_ROWS, 0);
   info_ptr->row_pointers = row_pointers;
   if(row_pointers)
      info_ptr->valid |= PNG_INFO_IDAT;

}
开发者ID:blair,项目名称:orca,代码行数:15,代码来源:pngset.c

示例4: png_get_pHYs

png_uint_32
png_get_pHYs(png_structp png_ptr, png_infop info_ptr,
   png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)
{
   if (info_ptr != NULL && info_ptr->valid & PNG_INFO_pHYs &&
      res_x != NULL && res_y != NULL && unit_type != NULL)
   {
      png_debug1(1, "in %s retrieval function\n", "pHYs");
      *res_x = info_ptr->x_pixels_per_unit;
      *res_y = info_ptr->y_pixels_per_unit;
      *unit_type = (int)info_ptr->phys_unit_type;
      return (PNG_INFO_pHYs);
   }
   return (0);
}
开发者ID:2asoft,项目名称:xray,代码行数:15,代码来源:pngget.cpp

示例5: png_set_gAMA

void PNGAPI
png_set_gAMA(png_structp png_ptr, png_infop info_ptr, double file_gamma)
{
   png_debug1(1, "in %s storage function\n", "gAMA");
   if (png_ptr == NULL || info_ptr == NULL)
      return;

   info_ptr->gamma = (float)file_gamma;
#ifdef PNG_FIXED_POINT_SUPPORTED
   info_ptr->int_gamma = (int)(file_gamma*100000.+.5);
#endif
   info_ptr->valid |= PNG_INFO_gAMA;
   if(file_gamma == 0.0)
      png_warning(png_ptr, "Setting gamma=0");
}
开发者ID:BackupTheBerlios,项目名称:wl530g-svn,代码行数:15,代码来源:pngset.c

示例6: png_get_y_offset_pixels

png_uint_32
png_get_y_offset_pixels(png_structp png_ptr, png_infop info_ptr)
{
#if defined(PNG_READ_oFFs_SUPPORTED) || defined(PNG_WRITE_oFFs_SUPPORTED)
   if (png_ptr != NULL && info_ptr != NULL && (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
#endif
   return (0);
}
开发者ID:pinchyCZN,项目名称:deepness,代码行数:15,代码来源:PNGGET.C

示例7: png_get_y_pixels_per_meter

png_uint_32
png_get_y_pixels_per_meter(png_structp png_ptr, png_infop info_ptr)
{
#if defined(PNG_READ_pHYs_SUPPORTED) || defined(PNG_WRITE_pHYs_SUPPORTED)
   if (png_ptr != NULL && info_ptr != NULL && (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
#endif
   return (0);
}
开发者ID:pinchyCZN,项目名称:deepness,代码行数:15,代码来源:PNGGET.C

示例8: png_get_oFFs

png_uint_32
png_get_oFFs(png_structp png_ptr, png_infop info_ptr,
   png_uint_32 *offset_x, png_uint_32 *offset_y, int *unit_type)
{
   if (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);
}
开发者ID:2asoft,项目名称:xray,代码行数:15,代码来源:pngget.cpp

示例9: png_set_cHRM

void PNGAPI
png_set_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_debug1(1, "in %s storage function\n", "cHRM");
   if (png_ptr == NULL || info_ptr == NULL)
      return;

   if (white_x < 0.0 || white_y < 0.0 ||
         red_x < 0.0 ||   red_y < 0.0 ||
       green_x < 0.0 || green_y < 0.0 ||
        blue_x < 0.0 ||  blue_y < 0.0)
   {
      png_warning(png_ptr,
        "Ignoring attempt to set negative chromaticity value");
      return;
   }
   if (white_x > 21474.83 || white_y > 21474.83 ||
         red_x > 21474.83 ||   red_y > 21474.83 ||
       green_x > 21474.83 || green_y > 21474.83 ||
        blue_x > 21474.83 ||  blue_y > 21474.83)
   {
      png_warning(png_ptr,
        "Ignoring attempt to set chromaticity value exceeding 21474.83");
      return;
   }

   info_ptr->x_white = (float)white_x;
   info_ptr->y_white = (float)white_y;
   info_ptr->x_red   = (float)red_x;
   info_ptr->y_red   = (float)red_y;
   info_ptr->x_green = (float)green_x;
   info_ptr->y_green = (float)green_y;
   info_ptr->x_blue  = (float)blue_x;
   info_ptr->y_blue  = (float)blue_y;
#ifdef PNG_FIXED_POINT_SUPPORTED
   info_ptr->int_x_white = (png_fixed_point)(white_x*100000.+0.5);
   info_ptr->int_y_white = (png_fixed_point)(white_y*100000.+0.5);
   info_ptr->int_x_red   = (png_fixed_point)(  red_x*100000.+0.5);
   info_ptr->int_y_red   = (png_fixed_point)(  red_y*100000.+0.5);
   info_ptr->int_x_green = (png_fixed_point)(green_x*100000.+0.5);
   info_ptr->int_y_green = (png_fixed_point)(green_y*100000.+0.5);
   info_ptr->int_x_blue  = (png_fixed_point)( blue_x*100000.+0.5);
   info_ptr->int_y_blue  = (png_fixed_point)( blue_y*100000.+0.5);
#endif
   info_ptr->valid |= PNG_INFO_cHRM;
}
开发者ID:AlexOteiza,项目名称:n64ios,代码行数:48,代码来源:pngset.c

示例10: png_set_cHRM_fixed

void PNGAPI
png_set_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_debug1(1, "in %s storage function\n", "cHRM");
   if (png_ptr == NULL || info_ptr == NULL)
      return;

   if (white_x < 0 || white_y < 0 ||
         red_x < 0 ||   red_y < 0 ||
       green_x < 0 || green_y < 0 ||
        blue_x < 0 ||  blue_y < 0)
   {
      png_warning(png_ptr,
        "Ignoring attempt to set negative chromaticity value");
      return;
   }
   if (white_x > (double) PNG_MAX_UINT || white_y > (double) PNG_MAX_UINT ||
         red_x > (double) PNG_MAX_UINT ||   red_y > (double) PNG_MAX_UINT ||
       green_x > (double) PNG_MAX_UINT || green_y > (double) PNG_MAX_UINT ||
        blue_x > (double) PNG_MAX_UINT ||  blue_y > (double) PNG_MAX_UINT)
   {
      png_warning(png_ptr,
        "Ignoring attempt to set chromaticity value exceeding 21474.83");
      return;
   }
   info_ptr->int_x_white = white_x;
   info_ptr->int_y_white = white_y;
   info_ptr->int_x_red   = red_x;
   info_ptr->int_y_red   = red_y;
   info_ptr->int_x_green = green_x;
   info_ptr->int_y_green = green_y;
   info_ptr->int_x_blue  = blue_x;
   info_ptr->int_y_blue  = blue_y;
#ifdef PNG_FLOATING_POINT_SUPPORTED
   info_ptr->x_white = (float)(white_x/100000.);
   info_ptr->y_white = (float)(white_y/100000.);
   info_ptr->x_red   = (float)(  red_x/100000.);
   info_ptr->y_red   = (float)(  red_y/100000.);
   info_ptr->x_green = (float)(green_x/100000.);
   info_ptr->y_green = (float)(green_y/100000.);
   info_ptr->x_blue  = (float)( blue_x/100000.);
   info_ptr->y_blue  = (float)( blue_y/100000.);
#endif
   info_ptr->valid |= PNG_INFO_cHRM;
}
开发者ID:AlexOteiza,项目名称:n64ios,代码行数:48,代码来源:pngset.c

示例11: png_set_iCCP

void PNGAPI
png_set_iCCP(png_structp png_ptr, png_infop info_ptr,
             png_const_charp name, int compression_type,
             png_const_bytep profile, png_uint_32 proflen)
{
    png_charp new_iccp_name;
    png_bytep new_iccp_profile;
    png_size_t length;

    png_debug1(1, "in %s storage function", "iCCP");

    if (png_ptr == NULL || info_ptr == NULL || name == NULL || profile == NULL)
        return;

    length = png_strlen(name)+1;
    new_iccp_name = (png_charp)png_malloc_warn(png_ptr, length);

    if (new_iccp_name == NULL)
    {
        png_warning(png_ptr, "Insufficient memory to process iCCP chunk");
        return;
    }

    png_memcpy(new_iccp_name, name, length);
    new_iccp_profile = (png_bytep)png_malloc_warn(png_ptr, proflen);

    if (new_iccp_profile == NULL)
    {
        png_free (png_ptr, new_iccp_name);
        png_warning(png_ptr,
                    "Insufficient memory to process iCCP profile");
        return;
    }

    png_memcpy(new_iccp_profile, profile, (png_size_t)proflen);

    png_free_data(png_ptr, info_ptr, PNG_FREE_ICCP, 0);

    info_ptr->iccp_proflen = proflen;
    info_ptr->iccp_name = new_iccp_name;
    info_ptr->iccp_profile = new_iccp_profile;
    /* Compression is always zero but is here so the API and info structure
     * does not have to change if we introduce multiple compression types
     */
    info_ptr->iccp_compression = (png_byte)compression_type;
    info_ptr->free_me |= PNG_FREE_ICCP;
    info_ptr->valid |= PNG_INFO_iCCP;
}
开发者ID:robn,项目名称:pioneer-thirdparty,代码行数:48,代码来源:pngset.c

示例12: png_set_gAMA_fixed

void PNGAPI
png_set_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point
   int_gamma)
{
   png_debug1(1, "in %s storage function\n", "gAMA");
   if (png_ptr == NULL || info_ptr == NULL)
      return;

#ifdef PNG_FLOATING_POINT_SUPPORTED
   info_ptr->gamma = (float)(int_gamma/100000.);
#endif
#ifdef PNG_FIXED_POINT_SUPPORTED
   info_ptr->int_gamma = int_gamma;
#endif
   info_ptr->valid |= PNG_INFO_gAMA;
}
开发者ID:blair,项目名称:orca,代码行数:16,代码来源:pngset.c

示例13: png_get_text

png_uint_32
png_get_text(png_structp png_ptr, png_infop info_ptr, png_textp *text_ptr,
   int *num_text)
{
   if ((info_ptr != NULL) || (info_ptr->num_text > 0))
   {
      png_debug1(1, "in %s retrieval function\n",
         (png_ptr->chunk_name[0] == '\0' ? "text" : png_ptr->chunk_name));
      if (text_ptr != NULL)
         *text_ptr = info_ptr->text;
      if (num_text != NULL)
         *num_text = info_ptr->num_text;
      return (info_ptr->num_text);
   }
   return(0);
}
开发者ID:2asoft,项目名称:xray,代码行数:16,代码来源:pngget.cpp

示例14: png_get_acTL

png_uint_32 PNGAPI
png_get_acTL(png_structp png_ptr, png_infop info_ptr,
             png_uint_32 *num_frames, png_uint_32 *num_plays)
{
    png_debug1(1, "in %s retrieval function", "acTL");

    if (png_ptr != NULL && info_ptr != NULL &&
        (info_ptr->valid & PNG_INFO_acTL) &&
        num_frames != NULL && num_plays != NULL)
    {
        *num_frames = info_ptr->num_frames;
        *num_plays = info_ptr->num_plays;
        return (1);
    }

    return (0);
}
开发者ID:jianglu,项目名称:v8monkey,代码行数:17,代码来源:pngget.c

示例15: png_get_pixel_aspect_ratio

float
png_get_pixel_aspect_ratio(png_structp png_ptr, png_infop info_ptr)
   {
#if defined(PNG_READ_pHYs_SUPPORTED) || defined(PNG_WRITE_pHYs_SUPPORTED)
   if (png_ptr != NULL && info_ptr != NULL && (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)info_ptr->y_pixels_per_unit
            /(float)info_ptr->x_pixels_per_unit);
   }
   else
#endif
      return ((float)0.0);
}
开发者ID:pinchyCZN,项目名称:deepness,代码行数:17,代码来源:PNGGET.C


注:本文中的png_debug1函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。