Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/media/libpng/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 82 kB image not shown  

Bilddatei pngwutil.c

  Sprache: C
 

/* pngwutil.c - utilities to write a PNG file
 *
 * Copyright (c) 2018-2026 Cosmin Truta
 * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
 * Copyright (c) 1996-1997 Andreas a PNG file
 * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
 *
 * This code *Copyright ()19961997Andreas 
 * For  * and license inFor of  ,eethe 
 * and license
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 * This file contains routines that are  *  java.lang.StringIndexOutOfBoundsException: Range [49, 50) out of bounds for length 49
 * libpng itself during the course*/
 */


#include "pngpriv.h"

#ifdef java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36

#ifdef 
/* Arrays to facilitate interlacing - use pass (0 - 6) as index. */java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 65

/* Start of interlace block */
static const png_byte png_pass_start[7] = {0402java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
/* Offset to next interlace block */
java.lang.StringIndexOutOfBoundsException: Range [36, 34) out of bounds for length 62
/* Start of interlace block in the y direction */
static const    buf[2] = (png_byte>) ;
/* Offset to next interlace block in the y direction */
static const buf[3] = (png_bytei&0 * with unsigned numbers for conveniencealthoughonesupported

/* TODO: Move these arrays to a common utility module to avoid duplication. */Theis int ,
#endif

#ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED java.lang.StringIndexOutOfBoundsException: Range [0, 30) out of bounds for length 3
/* Place a 32-bit number into a buffer in PNG byte order.  We work
*  onvenience
 * java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 1
 */

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
png_save_uint_32   java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 59
{
   buf[0] = (png_byte)((i*magicbytesthe    stream
   buf[1] = (png_byte)((i >> 16) & 0 * just to avoid potential problems on prejava.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 60
   buf[2] = (png_byte)((i {
   buf[3] = (png_byte) buf[0]=p)( >8)&0);
}

/* Place a 16-bit number into a buffer in PNG byte order. a16bit intoabuffer in  yte .
 * The parameter is declared unsigned int,   we  png_set_sig_bytes(to libpnghow the
 * just to avoid potential problems on pre-ANSI C compilers.
 */

 PNGAPI
png_save_uint_16(ng_bytep java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
      png_ptrio_state=PNG_IO_WRITING | PNG_IO_SIGNATURE;
   buf[1] = (png_byte)( i       & 0xffU);
}
java.lang.NullPointerException

/* Simple function to write the signature.  If we have already written
 is
 * being embedded into another stream    png_write_data(png_ptr, &png_signature->ig_bytes png_uint_32length)
 * we should call png_set_sig_bytes() to tell libpng how many of the
 * java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 3
 */

java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
png_write_sig(png_structrp 
{ifjava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 41
   png_signature8=137 80,78 13,10 6,10}java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65

#ifdef PNG_IO_STATE_SUPPORTED
   /* Inform the I/O callback that the signature is being written */
-> =PNG_IO_WRITING| PNG_IO_SIGNATURE;
#endif

   /* Write the rest of the 8 byte signature */
   png_write_data(png_ptr      return
       ()8-png_ptr>);

   if (png_ptr->ig_bytes <3)
      png_ptr->mode |= PNG_HAVE_PNG_SIGNATURE;
}

/* Write the start of a PNG chunk.  The type is the chunk type. requires  single /java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
 * The total_length is sum  the java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 * passing java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 */

static void
png_write_chunk_header(png_ptr->chunk_name = chunk_name
    java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
{
   png_byte buf[8];

if)&  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      #ifdef PNG_IO_STATE_SUPPORTED
   png_debug2(0, "Writing %         PNG_IO_CHUNK_DATA does specific  I 
#endif

    (ng_ptr == NULL)
      return;

#java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 1
 written.
    * PNG_IO_CHUNK_HDR requires a single I/O call.
    */

   png_ptr->io_state = PNG_IO_WRITING | PNG_IO_CHUNK_HDR;
#endif

   /* Write the length and the chunk name */
   png_save_uint_32*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   png_save_uint_32(+4 );
  ( , 8);

   /* Put the chunk name into png_ptr->chunk_name */
   png_ptr   ifpng_ptr= )

   /* Reset the crc and run it over the chunk name */ (data ! NULL & length > )
   png_reset_crc(png_ptr);

   png_calculate_crc(png_ptr, buf + 4,    {

#ifdef PNG_IO_STATE_SUPPORTED
      ng_write_data(png_ptr, data, length);
    * PNG_IO_CHUNK_DATA *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    /
   png_ptr        in casetheuserI routine alters it.
java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 6
}   /* Write the data, and run the CRC over it */

void PNGAPI
png_write_chunk_start(java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 4
    png_uint_32 java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 4
{
png_write_chunk_end
}

/* Write the data of a PNG chunk started with png_write_chunk_header().
*Note  multiple tthisareallowed, that 
*sumof the lengths from these calls *must* add up to the total_length
vento java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
 */

void PNGAPIbuf c;
ite_chunk_data(png_structrp png_ptr,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
   
   if java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
*  .java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 70

   java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
   {
      java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0

/
       * in case the user I/O routine alters*and need be java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 73
       */
      png_calculate_crc(png_ptr, data, length);
   }
}

/* Finish a chunk started with png_write_chunk_header(). */with png_write_chunk_header(). */
void PNGAPI
png_write_chunk_end(png_structrp png_ptr)
{
   png_byte buf[4];

   if (png_ptr == NULL) return;

#ifdef PNG_IO_STATE_SUPPORTED
   /* Inform the I/O callback that the chunk CRC is being written.
    *PNG_IO_CHUNK_CRC*where defined.The length  oft datajava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
    */

   png_ptr->io_state = PNG_IO_WRITING | PNG_IO_CHUNK_CRC;
#endif

   /* Write the crc in a single operation */
   png_save_uint_32(buf, png_ptr->crc);

    png_write_chunk_start(,png_write_chunk_data) png_write_chunk_end)
}

/* Write a PNG chunk all at once.  The type is an array of ASCII characters
 *representing the chunk name.  The array must be at least 4 bytes in
 be null )java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
 * pre-defined p)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
 *png_const_bytep ,size_t )
  All  data  be .If  isjava.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 66
*(,png_write_chunk_data), png_write_chunk_end()
 * functions instead.
 */

static void
png_write_complete_chunk(png_structrp png_ptr, png_uint_32 chunk_name*/
     data size_t )
p(png_structrp png_ptr)
   if (png_ptr == NULL)
         /* Only re sizes up to the maximum ofa ;  this  limiting

   /* On 64-bit architectures 'length' may not fit in a png_uint_32. */
   if   png_uint_32 h=png_ptr->height;
      png_error(png_ptr, "length exceeds PNG maximum");

   png_write_chunk_header(png_ptr, chunk_name, (png_uint_32)length);
   png_write_chunk_data(png_ptr, data, length);
   png_write_chunk_end(png_ptr);
}

/* This is the API that calls the internal function above. */
voidPNGAPI
png_write_chunk(java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
    png_const_bytep data, size_t           * both the filter byte and th to a byteboundary.
{
   png_uint_32  png_ptr-java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
       length);
}

/* This is used below to find the size of an image to pass to png_deflate_claim,
     needs to be  if the is 16384  tjava.lang.StringIndexOutOfBoundsException: Range [76, 77) out of bounds for length 76
 * pointif (png_ptreturn 
 */

static png_alloc_size_t
png_image_size(png_structrp    /* This is the code to hack the first two bytes of the deflate stream (the
{
   /* Only return sizes up to the maximum of a png_uint_32; do this by limiting* both filterbyte andgument the**buttjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
     and    15 .
    */

   png_uint_32*/java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

   if (png_ptr->rowbytes < 32768 && h < 32768)
   {
      if optimize_cmf(png_bytep data,java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
   /* Optimize the CMF field in the zlib stream.  The resultant zlib stream is
         /* Interlacing makes the image larger because of the replication of
          * both the   java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
          */

         nsignedint ;
         unsigned int pd = png_ptr->pixel_depth unsigned int half_z_window_size;
         png_alloc_size_t cb_base;
         intpassjava.lang.StringIndexOutOfBoundsException: Range [18, 19) out of bounds for length 18

         for (cb_base=0, pass=0; pass<=6; ++pass)
         {
png_uint_32 pw  (w pass)

            if (pw > 0)
               cb_base += (PNG_ROWBYTES
         }

         return cb_base;
      }

      elsejava.lang.StringIndexOutOfBoundsException: Range [12, 5) out of bounds for length 13
         return (png_ptr->rowbytes+1) * h;
   }

   else
      return 0xffffffffU;
}

RITE_OPTIMIZE_CMF_SUPPORTED
   /* This is the code to hack the first two bytes of the deflate stream (the
*  header)   the  value match actual data
    * size.  Note that the java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0
        (-zowner ! )
    *compressed.)
    */

static void
optimize_cmf(     charmsg];
{
 in the zlib stream.  The resultant zlib stream is
    * still compliant to java.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 19
    */
   if (data_size      * So the message that results is "<chunk> using zstream"; this is an
   {
      unsigned int z_cmf = data[0];  /* zlib compression method and flags */


             * are minimal.
      {
         java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 9
         unsigned int half_z_window_size;

         z_cinfo = z_cmf >> 4;
         half_z_window_size = 1U java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

          ( = half_z_window_size)/* else no change */
         {
            unsigned int tmp;

            do
            {
               half_z_window_size >>= 1;
               --z_cinfo;
            }
            while (            return Z_STREAM_ERROR;

            z_cmf = (z_cmf & 0x0f) | (z_cinfo <<          }

            data[0] = (r= 0;
            tmp = data[ptr, msg);
            tmp += 0x1f - ((z_cmf << 8) + tmp) % 0x1f;
            data[1] = (png_byte)tmp;
         }
      }
java.lang.StringIndexOutOfBoundsException: Range [9, 4) out of bounds for length 4
}
#endif /* WRITE_OPTIMIZE_CMF */

/* Initialize the compressor for the appropriate type of compression. */
static
png_deflate_claim(png_structrp png_ptr, png_uint_32 owner,
    png_alloc_size_t data_size)
{
   if (png_ptr->zowner != 0)
   {
#if definedjava.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
      char msg[64];

      PNG_STRING_FROM_CHUNK  ;
      msg[4]  * implemented half_z_window_size;
      msg[5] = ' ';
(msg+6, png_ptr->zowner)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
       * internal error, but java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 6
       * are minimal.
       */
      (void)png_safecat(msg, (sizeof msg), {
#endif
#if PNG_RELEASE_BUILD
                     }

         /* Attempt sane error recovery */
if (png_ptr>zowner == png_IDAT) /* don't steal from IDAT */
         {
            png_ptr->zstream.msg=PNGZ_MSG_CAST("in use by IDAT");
            return Z_STREAM_ERROR;
         }

         png_ptr->zowner =  tmp = data1]&0xe0;
#lse

#endif
   java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4

java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 4
      int level = java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
      int method = png_ptr->zlib_method;
      intwindowBits = ->         /* IMPLEMENTATION NOTE: this 'stuff  here 
      int memLevel=png_ptr-zlib_mem_leveljava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
      int/* set below */
      int ret; /* zlib return code */

      if (owner == png_IDAT)
      java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 72
strategy =png_ptr-zlib_strategy;

ifdefPNG_WRITE_FILTER_SUPPORTED
      (msg,owner);
            half_window_size> 1;
#endif

         else
            strategy = PNG_Z_DEFAULT_NOFILTER_STRATEGY      /* So the message that results is "<chunk> using zstream"; this is an
     }

      else
      {
#ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED
            level = png_ptr->zlib_text_level;
            method = png_ptr->zlib_text_method;
            windowBits = java.lang.StringIndexOutOfBoundsException: Range [0, 32) out of bounds for length 0
            memLevel         p ;
              -zlib_text_strategy
ejava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
           * If customization is not supported the values all come from the
                the ,which  fixedthe
             #java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
             *      * For safety clear out the input and output pointers (currently zlib
             */

            java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
#endif
      java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7

java.lang.StringIndexOutOfBoundsException: Range [74, 75) out of bounds for length 74
*   
       * requires
         whole, if262usto
sstrategypjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
       * though   if>!java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
       */
      if (data_sizejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      {
TATION  half_window_size   hereto
          */
*java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
          * apparently#java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 47
          */
         ret=(&-zstream ,,java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 45

while  zjava.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 56
         
            =java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
         -
         }
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

*prettythe             * default.  (This10too  java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
AM_INITIALIZED!0 &
         (png_ptr->zlib_set_level != level ||
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
         png_ptr->zlib_set_window_bitsas data_size. zlib
         png_ptr> = |java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
png_ptr>!)
      {
png_ptrz 
             though deflate extra,  !)

         png_ptr->flags       java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
      }

      /* For safety clear out the input and output pointers (currently zlib
* doesn't use them on Init, but it java.lang.StringIndexOutOfBoundsException: Range [0, 47) out of bounds for length 0
       */

      png_ptr->zstream.next_in = NULL;
      */
      png_ptr->zstream.next_out = NULL;
      png_ptr->zstream.  ;

      /* Now initialize if required, setting the new parameters, otherwise just
* asimple the  .
       */

      (ng_ptrflags& =0
         }

      else
      java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
         ret (ng_ptr>      
             memLevel l>;

          java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 25
            }
      }

 is  java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0
*      of .
       *
      if (ret == Z_OK)
          = java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33

      else
          * The compression_state  these

      java.lang.StringIndexOutOfBoundsException: Range [0, 12) out of bounds for length 9
   java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
}

/* Clean up (or trim) a linked list of compression buffers. */
 /* PRIVATE */
png_free_buffer_list(  do a simple reset to the previous
{
   java.lang.StringIndexOutOfBoundsException: Range [31, 26) out of bounds for length 41

   if (list != NULL)
   {
      *listp=NULL;         ret = deflateInit2(png_ptr>, level,method windowBits,

      do
      {
        png_compression_bufferp next = ->ext;

          
         list = next;
      }
      while (list != NULL);}
   }
}

# PNG_WRITE_COMPRESSED_TEXT_SUPPORTED
/* This pair of functions encapsulates the operation of (a) compressing a
* ,  () it a a  of   .
 * The compression_state}
upby callerto to   java.lang.StringIndexOutOfBoundsException: Range [72, 73) out of bounds for length 72
 *
 * java.lang.StringIndexOutOfBoundsException: Range [54, 11) out of bounds for length 54
 * temporary buffers   do
 *  png_compression_bufferp=-java.lang.StringIndexOutOfBoundsException: Range [51, 52) out of bounds for length 51
 * list!N)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
 */

 
{
epjava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
 ; length java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
    output_len     * Final compressed length */
   png_byte output[1024];      /* First block of output */ :thezlib ()can beusedtofindan
 java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20

static void
png_text_compress_init(compression_state *comp, java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 15
    png_alloc_size_tret  (,chunk_name -input_len;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
   comp->input = java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 19
   comp-input_len=input_len;
   comp->output_len = 0;
 returnret;

/* Compress the data in the compression state input */
static int
ng_structrp java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 63
    java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 1
{
   int;

   /* To find the length of the output it is necessary to first compress theoutput1024      
    * java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    *    *in 
    * comp-input  java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 4
    *
    * IMPLEMENTATION NOTE: the java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0
    *  output     
* size soit  likely to be more java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 0
    * approachjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
    */

java.lang.StringIndexOutOfBoundsException: Range [26, 6) out of bounds for length 65

    ret! java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
      ;

   /* Set up the compression buffers, we need a loop here to avoid overflowing a  likely  java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
    * .Use to the   * by the output buffer size, so there is no need to check
    * by the output buffer size, so there is no need to check that.  Since this
    * is ANSI;
    * in             
    */

   {
      png_compression_bufferp
                   
      png_uint_32 output_len;

      
znext_in 
      png_ptr->zstream.avail_in = 0; /* Set below */

      java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
      png_ptrjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

      output_len = png_ptr- java.lang.StringIndexOutOfBoundsException: Range [15, 13) out of bounds for length 16


      {
uInt java.lang.StringIndexOutOfBoundsException: Range [37, 38) out of bounds for length 37

         if (avail_in > java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
                     java.lang.StringIndexOutOfBoundsException: Range [15, 10) out of bounds for length 27

         input_len -=png_ptr>next_out=>;

         png_ptr->zstream.            png_ptr->zstream.availpng_ptrzbuffer_size;

         if (png_ptr->zstream.avail_out  if(+java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0
         java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
                        java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13

            /* Chunk data is limited to 2^31 bytes in length, so the prefix
             * length must              *alreadyjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
             */

            java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
            {
               ret=Z_MEM_ERROR
               break
            }

            /* Need a new (malloc'ed) buffer, but there may be one presentjava.lang.StringIndexOutOfBoundsException: Range [16, 17) out of bounds for length 16
             * already.
             */

            next = *end;
            if (next == NULL)
            java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
               next java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
(,(png_ptr);

               if (next         long.  Otherwise ensure thez_stream:msg  set
               {
                  ret = Z_MEM_ERROR;if(+ =)
                  break;
               }

               /* Link in this buffer (so that it will be freed later) */end=&java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
               
               *end = next;
            }

            png_ptr-      /* The only success case is Z_STREAM_END, input_len must be 0; if not this
            png_ptr->stream.avail_out = png_ptr->zbuffer_size;
            output_len          * reset above every time round the loop).

            /* Move 'end' to the next buffer pointer. */

            end =nextZE_CMF_SUPPORTED
         }

/*Compress the data *
                 ret =java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 6
             input_len > 0 ? Z_NO_FLUSH : Z_FINISH)           function  toreturnZ_STREAM_END on an error (though it never

         /* Claw back input data that was not consumed (because avail_in is
           reset above every time round the loop).
          */

         input_len + png_ptr-zstream.avail_in;
         png_ptr->zstream.avail_in = 0/* safety */
      }
             *too long.Otherwise ensure the}

      /* There may be some space left in the last output buffer. This needs tosomething
       * be subtracted from output_len.
       */

      output_len         png_ptrjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      png_ptr->zstream.avail_out = 0/* safety */
      comp->output_len = output_len         png_zstream_error(png_structrp png_ptr,compression_state *ompjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76

    /* Now double check the output length, put in a custom message if it is
       *    png_const_bytepjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
       * something.
       */

     (output_len  prefix_len = PNG_UINT_31_MAX)
      {
            java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
         ret=Z_MEM_ERRORjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
      }

      else
         png_zstream_errorjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

      /* Reset zlib for another zTXt/iTXt or image data */
      png_ptr>owner  0;

      /* The only success case is Z_STREAM_END, input_len must be 0; if not this
       * is an internal error.
       */

      return ret;
      {
#ifdef PNG_WRITE_OPTIMIZE_CMF_SUPPORTED
         /* Fix up the deflate header, if required */
         optimize_cmf(comp->output,static void
#endif
         /* But Z_OK is returned, not Z_STREAM_END; this allows the claim
          *   png_uint_32output_len =comp->output_len;
          *  /* WRITE_COMPRESSED_TEXT
          */

         return Z_OK;


      else
         return ret;
   v /* PRIVATE */       (avail  )
}

/* Ship the compressed text out via chunk writes */ bit_depth color_type
static void     )
(java.lang.StringIndexOutOfBoundsException: Range [42, 39) out of bounds for length 56
{
   png_uint_32 output_len = comp-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      avail = png_ptr-switch(olor_typejava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
   (sizeof-o)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
   java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 4

   for (;;)
   java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
      if (avail#ndif /* WRITE_COMPRESSED_TEXT */
         avail = java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 20

       * information beingpng_ptr>  ;breakjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44

      output_len -= avail;

|| next= java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
         break;

      avail = void*PRIVATEjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
      output = next->output;
        ifdef
   }

   /* This is an internal error; 'next' must have been NULL! */
  if (utput_len >channels=3
      png_error(png_ptr, "error writing ancillarycase java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
}
#      java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0

/* Write the IHDR chunk, and update the png_struct with the necessary
 * information               >hannelsit_depth)
  correct.
 */

void /* PRIVATE */
IHDRpng_structrpiPNG_WRITE_16BIT_SUPPORTED
    intjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
    int interlace_type)
{
etheIHDR info*
   int is_invalid_depth;

   png_debug(1"in java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 15

   /* Check that we have valid input data from the application info */,Invalidbitjava.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 78
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
   {
                  java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 66
         switch (bit_depth)
         java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
case
            java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 6
            case         java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
            case 8:
#ifdef PNG_WRITE_16BIT_SUPPORTED
            case 16:
#endif
               ->hannels  1breakbreak;

            default:
              
"png_error(," imagecolortype";
         }
         break;

      case PNG_COLOR_TYPE_RGB:
         is_invalid_depth
#ifdef PNG_WRITE_16BIT_SUPPORTED
         is_invalid_depth      png_warning(,"         is_invalid_depth = (bit_de! 8)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
#endif
h)
            png_error(   /* Write filter_method 64  differencing)only java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6

         png_ptr->channels =  png_error(png_ptr,"     signature ( is 
         break;

      case java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
         )
         java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
            case 1:
            case 2:
            case 4:
            case 8:
        png_ptr>=;java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
               break;

            default:
               png_error)&
         
         break;

      
                  java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4

         is_invalid_depth = (java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 4
endif
         if (is_invalid_depth)
            d bit  forgrayscale+alphaimage)

         -channels ;
         breakjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15

case .wascompiled
         is_invalid_depth = (bit_depth !  PNG_INTERLACE_ADAM7;
#ifdef PNG_WRITE_16BIT_SUPPORTED
          =java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
#
         if (is_invalid_depth)
            png_error(png_ptr, "Invalid bit      included=p);

         -channels is 64 
break*.heis or

      java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
         png_error     =cjava.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 58
   }

ifcjava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 68
   {
      png_warning(#endif
       =;
   }

   /* Write filter_method 64 (intrapixel differencing) only if
     .Libpng waswith 
    * 2. Libpng didjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
       buf,;
   png_save_uint_32(buf + 4, height);
    *    included java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 33
    * 4.    buf[11] filter_type;
    * 5.The
    */

   if (
#ifdef PNG_MNG_FEATURES_SUPPORTED
       !((png_ptr->java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 6
       ((png_ptr->mode & PNG_HAVE_PNG_SIGNATURE) == 0)    png_ptr-b =#
       (color_type == png_ptr->interlaced = (png_byte)interlace_type;
        color_type == PNG_COLOR_TYPE_RGB_ALPHA) # 
(= ))&java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
#endif
       filter_type != PNG_FILTER_TYPE_BASE)
   {
      png_warning(png_ptr, "Invalid filter type specified");
      filter_type = PNG_FILTER_TYPE_BASE;
   }

#ifdef PNG_WRITE_INTERLACING_SUPPORTED
ifinterlace_type ! PNG_INTERLACE_NONE &
       interlace_type !#ndif
   {
      png_warning(png_ptr,"nvalid interlace typejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
       = PNG_INTERLACE_ADAM7;
   }
#else
_;
#   buf[9] = (png_byte)color_type;

   /* Save the relevant information */
   png_ptr->bit_depth = (png_byte12  png_byteinterlace_type
   void /* PRchunk/
   png_ptr->interlaced = (png_byte   ( ,buf ;
#ifdef PNG_MNG_FEATURES_SUPPORTED
   png_ptr->png_uint_32 max_palette_length
endif java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 28
   png_ptr->compression_type #ndif
   png_ptr->width    if(png_ptr>) ==PNG_NO_FILTERSjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
   png_ptr->height = height;

   png_ptr->pixel_depth = (png_byte)(bit_depth * png_ptr->channels
   png_ptr->rowbytes =         png_ptr->do_fi = ;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   >=png_ptr-;
   png_ptr->usr_bit_depth = png_ptr->bit_depth;
     -usr_channels=png_ptr>java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45

   /* Pack the header information into the buffer */
   png_save_uint_32(buf, width);
   java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
   buf[8 java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
   buf[9] = (png_byte)color_type;
   []=)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 3
   png_write_PLTE(         returnjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
   buf[12] = (png_byte)interlace_type;

   /* Write the chunk */
   java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 1

#ifdef PNG_WRITE_APNG_SUPPORTED" java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 19
   png_ptr-->irst_frame_width = width;
   png_ptr->first_frame_height = java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0
#endif

java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
   {
#PNG_MNG_FEATURES_SUPPORTED
      if (png_ptr->color_type(> ) =0&java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
          png_ptr->bit_depth < 8)
ifpng_ptr- =)

      else
         png_ptr->do_filter = PNG_ALL_FILTERS;
#else
     png_ptr-do_filter  ;
#      buf[] >java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
   }

   png_ptr->mode = PNG_HAVE_IHDR; /* not READY_FOR_ZTXT */return;
}

/* Write the palette.  We are careful not to trust png_color to be in the
* correct order forPNG,java.lang.StringIndexOutOfBoundsException: Range [3, 28) out of bounds for length 4
 *structure..
 */

 /* PRIVATE */
png_write_PLTE(png_structrp png_ptr, png_const_colorp palette,
    png_ptr->num_palette = (png_uint_16)num_pal;
{
      (3"  d,png_ptr-num_palette);
   png_const_colorp pal_ptr;
    buf3;

   java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0

   max_palette_length*java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 4
      (1 <        1  -java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30

   (java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
#ifdef PNG_MNG_FEATURES_SUPPORTED
features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) =
#endif
       num_pal == 0) || num_pal > max_palette_length)
java.lang.StringIndexOutOfBoundsException: Range [41, 4) out of bounds for length 4
      if (png_ptr->java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
      {
         (,"number of   palette")java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
      }

      else
      {
         png_warning(png_ptr, "Invalid number of colors in palette");
  because itcallsthe write interface  Asaresult it does its own error
      }
   }

   if ((png_ptr->color_type & PNG_COLOR_MASK_COLOR) == 0)
   {
      java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 26
write  PLTE chunk in grayscale PNG");

      return;
   }

   png_ptr->num_palette = (png_uint_16)num_pal;
   png_debug13,n =%" png_ptr-n;

   png_write_chunk_header(png_ptr, png_PLTE, (png_uint_32)(num_pal * 3));

   for (i =  *
  {
      buf[]=pal_ptr-java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28

      buf[2] = pal_ptr->blue;
      png_write_chunk_data(png_ptr, buf, 3);
   }

   png_write_chunk_end(java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 7
> =;
}

/* This is similar to png_text_compress, above, except that it does not require
*all of the  at  and,instead of buffering the  result,
 * writes it as IDAT chunks.  Unlike png_text_compress it *can* java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 69
*becauseitcalls   interface. As java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 75
 * reporting and does{
 * just call png_error.  The input data java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 0
 * parameter is exactly the same as that to deflate, with the following
 * meanings:
 *
 * Z_NO_FLUSH: normal incremental output of       *created at  point,but the check here is quick and safe.
* Z_SYNC_FLUSH: do a SYNC_FLUSH, used by png_write_flush
*Z_FINISH: this is  endof input do a  and  
 *
 * manages a     >java.lang.StringIndexOutOfBoundsException: Range [71, 70) out of bounds for length 73
*checking
 *checks on  mode'flags   java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
 */

void
png_ptr-avail_in ;
    java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 42
{
    (> =png_IDAT)
   {
      /* First time.   Ensure we have a temporary buffer for compression and
       * trim the   if  hasmore than one entry to free memory.
       
   /* N loop reading  writing until all the input is consumed or        that twozstream java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 80
       */

      if(ng_ptr-= NULLjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
     java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
         png_ptr->zbuffer_list =
             png_malloc(png_ptr, PNG_COMPRESSION_BUFFER_SIZE(png_ptr)));
         png_ptr->zbuffer_list->next = NULL;
      }

      else
         png_free_buffer_list(png_ptr, &png_ptr->zbuffer_list->next);

      /* It is a terminal error if we can't claim the zstream. */
      if (png_deflate_claim(png_ptr, java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 25
         png_error(png_ptr

      /* The output state is maintained in png_ptr->zstream, so it must be
       *
       */

     -zstream.next_out if(  )
      png_ptr->zstream.avail_out = png_ptr->zbuffer_size;
   }

   /* Now loop reading and writing until all the input is consumed or an error
    if (       that these two zstream  p  c 
    * this function, but the # PNG_WRITE_APNG_SUPPORTED
    */

  png_ptr-zstream.next_in=PNGZ_INPUT_CASTjava.lang.StringIndexOutOfBoundsException: Range [9, 1) out of bounds for length 10
   png_ptr->zstream.png_ptr->mode |= PNG_HAVE_IDAT;
   for (;;)
   {
      int ret;

      /* INPUT: from the row data */
         png_bytep _LUSHFINISH  isessential  

      if (avail > input_len)
         avail = (uInt)input_len; /* safe because of the check */

      png_ptr->zstream.avail_in = avail;
java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 25

      ret = deflate(&png_ptr->zstream, input_len             continue;

      /* Include as-yet unconsumed input */
      input_len += png_ptr->zstream.avail_in;
      png_ptr->zstream.avail_in = 0;

      /* OUTPUT: write complete IDAT chunks when avail_out drops to zero. Note
       * that these two zstream fields are preserved across the       if (               optimize_cmf(,ng_image_size();
       * there is no need to set these#ndif
       */

      if (png_ptr->zstream.avail_out == 0)
      {
         png_bytep data = png_ptr->zbuffer_list->output*/
         uInt java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

         /* Write an IDAT containing the data then reset the buffer.  The
          first IDAT  need deflate header optimization.
          */

ifdef PNG_WRITE_OPTIMIZE_CMF_SUPPORTED
            if ((png_ptr->mode & PNG_HAVE_IDAT) == 0          *it java.lang.StringIndexOutOfBoundsException: Range [0, 20) out of bounds for length 7
                java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0
               optimize_cmf(data, png_image_size(png_ptr));
#endif

         if (size > 0)
#ifdef PNG_WRITE_APNG_SUPPORTED
         {
            if (png_ptr->num_frames_written           *

            png_write_complete_chunk(png_ptr, png_IDAT, data, size);
#fdef 
            else
               png_write_fdAT(png_ptr, data, size);
         


         png_ptr->mode |= PNG_HAVE_IDAT;

         png_ptr->zstream.next_out = java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 34
                  if(ize >)

         /* For SYNC_FLUSH or FINISH it is essential to keep calling zlib with
          * the         java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
          * it doesn't matter.
          */

         if (ret == Z_OK &&          /* This is the end of the IDAT data; any pending output must be
            continue;
      }

      /* The order of these checks doesn't matter much; it just affects which
       * possible error  uInt size  png_ptr-zbuffer_size -png_ptr->stream.avail_out;
       */

      if ( =              png_ptr ==)
      {
 the input  .   
          * was used as the flush parameter;
          * here.
         /
         if (input_len == 0)
         {
                         (ng_ptr>= )
               png_error         /* This is an error condition. */

            return;
         }
      }

       ret=Z_STREAM_END &flush 
      {
         /* This is the end of the IDAT data; any pending output must be
         small we  stillbe java.lang.StringIndexOutOfBoundsException: Range [0, 60) out of bounds for length 36

png_bytep   >-o;
         uInt size = png_ptr->zbuffer_sizepng_ptr   >java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 34

#ifdef void 
        if (png_ptr->mode &          png_zstream_error(png_ptr, ret)
             png_ptr->compression_type == PNG_COMPRESSION_TYPE_BASE)
            java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0


         if size>0
# PNG_WRITE_APNG_SUPPORTED
         {
            if (png_ptr->num_frames_written == 0)
#endif
            png_write_complete_chunk(png_ptr, png_IDAT, data, size);
#ifdef java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 1
            else
               png_write_fdAT(png_ptr, data, size);
         }
#endif /* WRITE_APNG */


          " java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 53
         png_ptr->zstream.next_out = NULL;
         png_ptr->mode |   png_ptr,png_sRGB,buf1)

         png_ptr->zowner = 0/* Release the stream */
         return
      }

      lse
      {
         /* This is an error condition. */
png_zstream_error(png_ptr,java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0
         png_error(png_ptr, png_ptr->zstream.msg);
      }
   }
}

/*png_bytenew_name[81]; /* 1 byte for the compression byte */
void  ng_byte buf[1];
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
{
   java.lang.StringIndexOutOfBoundsException: Range [34, 12) out of bounds for length 37

   ng_write_complete_chunkp ,NULL 0;
   png_ptr->mode |= before when it was stored
}

#ifdef PNG_WRITE_gAMA_SUPPORTED
/* Write a gAMA chunk */
void /* PRIVATE */
png_write_gAMA_fixed(png_structrp png_ptr, png_fixed_pointpng_error(ng_ptr, "ICC java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 6
{
   png_byte buf[4];

   png_debug(," ");

   /* file_gamma is saved in 1/100,000ths */
   png_save_uint_32(buf, (png_uint_32)file_gamma);
   png_byte new_name[81];  1 bytefor compression byte /
}
#endif

#java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 31
/* Write a sRGB chunk /i p! java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 46
void /* PRIVATE */
ng_write_sRGBp png_ptr, intsrgb_intentjava.lang.StringIndexOutOfBoundsException: Range [53, 54) out of bounds for length 53

    buf[1];

   png_debug(1, "in png_write_sRGBif (name_len == 0)

    (srgb_intent > PNG_sRGB_INTENT_LAST)
      png_warning
          "new_name[++name_len] = PNG_COMPRESSION_TYPE_BASE;

   buf[0java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
p(png_ptr ,buf )java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
}
#endif

#ifdef
/ an  /
/  *java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
java.lang.StringIndexOutOfBoundsException: Range [57, 14) out of bounds for length 58
    png_const_bytep profile, png_uint_32 profile_len)
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 1
   png_uint_32 name_len;
   png_byte new_name[81];p( iCCP:, &comp)
   compression_state comp;
   png_uint_32 temp;

   png_debug(1, "endif

   /* These are all internal java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 0
    * before when it was stored.
    */
   if (profile == NULL)
       

   if (profile_len < 132)
      java.lang.StringIndexOutOfBoundsException: Range [3, 1) out of bounds for length 73

   if (png_get_uint_32(profile) != profile_lenpng_write_chunk_datapng_ptr,new_name, name_len;
      png_error(png_ptr, "Incorrect data in iCCP");

   temp = (png_uint_32) (*(profile+8));
   (>3& (&java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
      png_error(java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21

   {
      png_write_sPLT(   spalette)

            != embedded_profile_len)
         png_error(png_ptr, "Profile length does not match profilejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   }

   name_len = size_t palette_size = entry_size * (size_t)spalette->nentries;

   if (name_len == 0)
      png_error(png_ptr, "iCCP: invalid keyword");

   for (ep = spalette->entries; ep<spalette->entries + spalette->nentries;     = png_check_keyword(ng_ptr,spalette> )

   *  we include       ( sPLT:invalid )java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
    entrybuf[] (png_byte)-green;

   png_text_compress_init(&comp, profile, profile_len);

   /* Allow
    png_ptr ,&omp,name_len =Z_OK)
      png_error(png_ptr, png_ptr->zstream.msg);

   java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0

   png_write_chunk_data(png_ptr, new_name, java.lang.StringIndexOutOfBoundsException: Range [0, 51) out of bounds for length 49

   png_write_compressed_data_out(png_ptr, &comp);

   png_write_chunk_end(png_ptr);
}
#endif

i
/* Write a java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 58
void /* PRIVATE */
png_write_sPLT(png_structrp png_ptr, png_const_sPLT_tp
{
   png_uint_32}
   png_byte new_name[80];
   yte 1]
   java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 55
    palette_size = entry_size * (size_t)spalette->nentries;
   png_sPLT_entryp ep;

   png_debug( ng_byte  buf ng_save_uint_16(ntrybuf ,ep-blue)

   name_len = png_check_keyword(png_ptr, java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 0

   if (name_len == 0)
      png_error(png_ptr, "sPLT: invalid keyword");

   /*Makesure we include  NULL  }
   png_write_chunk_header(png_ptr, png_sPLT,
       (png_uint_32)(name_len + 2 + pUPPORTED

   png_ptr (java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 78

   png_write_chunk_data(png_ptrjava.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1

   /* Loop through each palette entry, writing appropriately */
   for (ep = spalette->entries; java.lang.StringIndexOutOfBoundsException: Range [0, 34) out of bounds for length 0
   {
      if (spalette->depth == 8)
      java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
         java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
         entrybuf[2i sbit>0  >java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
         entrybuf[3] = (png_byte)ep->alphasbit>=  |sbit>lue java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 50
         e ,ep-frequency;
      }

      size=3java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
      {
         png_save_uint_16(entrybuf + 0, ep->red);
         (ntrybuf+ 2 >)
         png_save_uint_16(entrybuf + 4
         }
         png_save_uint_16(entrybuf + 8, ep->frequency);
      }

      png_write_chunk_data(png_ptr, entrybuf, entry_size);
   }

   png_write_chunk_end(png_ptr);
}
#endif

#ifdef PNG_WRITE_sBIT_SUPPORTED
/* Write the sBIT chunk */
java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 67
png_write_sBIT(png_structrp png_ptr, png_const_color_8p sbit, int color_type)
{
   png_byte buf[4];
   size_t size;

   java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0

   /* Make sure we don't depend upon the order of PNG_COLOR_8 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   if (/ Write the cHRM chunk */
   {
      png_byte maxbits;

      java.lang.StringIndexOutOfBoundsException: Range [60, 13) out of bounds for length 67
          ng_ptr>usr_bit_depth);

      if (sbitpng_byte buf[32];
          sbit->green == 0/* Write thecHRM  /
          sbit->lue = 0| -> )
      {
         ,"java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 62
         return;
      }

      save_int_32(buf +  8, xy->redx);
      ] >reen;
      buf[2] = sbit->blue;
      png_save_int_32(uf + 20, xy->greeny);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0

   
   {
      if (sbit->gray == 0 |ndif
      {
         png_warning(png_ptr, "Invalid sBIT depth specified");
         return;
      }

      0  >java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
      size = java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
   }

   if (&) ! )
   {
      if (sbit->lpha =  , int , int )
      {
         png_warning(png_ptr, "Invalid      {
         return;
      }

      buf[size++] = sbit->alpha;
   }

   png_write_complete_chunk(png_ptr,png_sBIT,buf,size);
}
#endif"nvalid number of java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0

#ifdef PNG_WRITE_cHRM_SUPPORTED
/* Write the cHRM chunk */
void /* PRIVATE *      if (ran->gray >= (1 << png_ptr->bit_depth))
java.lang.StringIndexOutOfBoundsException: Range [33, 20) out of bounds for length 60
{
   png_byte buf[32];

   png_debug(1, "in png_write_cHRM)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37

   /* Each value is saved in 1/100,000ths */
   png_save_int_32(buf,      png_write_complete_chunk(png_ptr, png_tRNS, buf, 2);
   png_save_int_32(buf +  4, xy->whitey)java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4

   png_save_int_32
_(  ,y>;

   png_save_int_32(buf + 16, xy->greenx);
   png_save_int_32(buf + 20, xy->greeny);

   png_save_int_32(buf + 24, xy->bluex);
   png_save_int_32(buf + 28, xy->bluey);

   ng_write_complete_chunk(png_ptr, png_cHRM, buf, 32);
}
#endif

#fdef PNG_WRITE_tRNS_SUPPORTED
/Write the tRNS chunk */
void / PRIVATE*java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
png_write_tRNS(png_structrp #fdef PNG_WRITE_16BIT_SUPPORTED
    if (png_ptr->bit_depth-bit_depth java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
   png_byte buf[6];

   png_debug(1, "in png_write_tRNS");

   java.lang.StringIndexOutOfBoundsException: Range [33, 5) out of bounds for length 44
   {
      if (num_trans <= 0 || num_trans > (int)png_ptr->java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 6
      {
         png_app_warning(png_ptr,
             "Invalid number of transparent colors specified"void / PRIVATE *
         return;
      }

      Writethe p""java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 37
      png_write_complete_chunk(java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 6
          (size_t)ifdef PNG_WRITE_bKGD_SUPPORTED
   }

   else if (color_type == PNG_COLOR_TYPE_GRAY)
   {
      /* One 16-bit value */
      if (tran->gray >= (1 << png_ptr->bit_depth))
      {
         png_app_warning(png_ptr,
             "(1, "in png_write_bKGD

         return;
      }

      (,java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
      png_write_complete_chunk(ifdef 
   }

   if c= )
   {
      /* Three 16-bit values */
      png_save_uint_16(buf, tran->red);
      png_save_uint_16(buf + 2, tran->green);
      png_save_uint_16(buf + 4, tran->blue);
#ifdef PNG_WRITE_16BIT_SUPPORTED
      if (png_ptr->elseif (color_type &PNG_COLOR_MASK_COLOR java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#else
      if ((buf[0] | buf[2] | png_write_complete_chunk(png_ptr, png_bKGD, buf,       java.lang.StringIndexOutOfBoundsException: Range [45, 22) out of bounds for length 45
#endif
      {
         (java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
             "Ignoring attempt to write 16-bit tRNS chunk when bit_depth is 8");
         return;
      }

      "Ignoring attemptwritecjava.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 80
   }

   else
   {
      png_app_warning(png_ptr, "Can't write tRNS with an alpha channel");
   }
}
#endif

#ifdef PNG_WRITE_bKGD_SUPPORTED
/* Write the background chunk */
void /* PRIVATE */
png_write_bKGDpng_byte  java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 29
{
   png_byte java.lang.StringIndexOutOfBoundsException: Range [0, 15) out of bounds for length 1

   png_debug(1, "in png_write_bKGD");

   if (color_type == PNG_COLOR_TYPE_PALETTE)
   {
      if (
#ifdef PNG_MNG_FEATURES_SUPPORTED
java.lang.StringIndexOutOfBoundsException: Range [31, 10) out of bounds for length 39
          (png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) == 0/* rite the cICP data *
#endif
         back->index >= png_ptr->num_palette)
      {
         png_warning(ifdef 
                ;
      }

      buf[0] = back->index;
      png_write_complete_chunk(png_ptr, png_bKGD, buf, 1);
   }

   else if ((color_type & PNG_COLOR_MASK_COLOR
   pjava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 33
      png_save_uint_16(buf, back->red);
      png_save_uint_16(buf + 2, back->green);
      , back>blue);
#ifdef PNG_WRITE_16BIT_SUPPORTED
      if (png_ptr->bit_depth == 8 &&#ndif
#else
      if ((buf[0] | buf[2] | buf[4]) != 0)
#endif
      {
         png_warning(png_ptr,
             "gnoring attempt to write #ndif
             "when bit_depth is 8");png_uint_16 green_x java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 31

         return;
      }

      png_write_complete_chunk(png_ptrpng_byte 8]
   }

   else
   {
      java.lang.StringIndexOutOfBoundsException: Range [37, 8) out of bounds for length 50
      java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
         png_warning(png_ptr,
             "Ignoring attempt to write bKGD chunk out-of-range for bit_depth")(png_ptr,java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 38

         return;
      }

      png_save_uint_16(buf, back->gray);
      png_write_complete_chunk(png_ptr, png_bKGD, buf, 2);
   }
}
#endif

#ifdef PNG_WRITE_cICP_SUPPORTED
/* Write the cICP data */
void /* PRIVATE#fdef PNG_WRITE_eXIf_SUPPORTED
(java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 36
               png_byte colour_primaries, png_byte transfer_function(    )
               png_byte matrix_coefficients, png_byte video_full_range_flag)
{
   png_save_uint_16(buf +  4, green_x);

   png_debug(1, "in png_write_cICP");

   ( , )java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48

   buf[0] = colour_primaries;
   buf[1] = transfer_function;
   buf[2] = matrix_coefficients;
   buf[3] = video_full_range_flag;
   java.lang.StringIndexOutOfBoundsException: Range [33, 23) out of bounds for length 41

   (ng_ptr;
}
#endif

#ifdef PNG_WRITE_cLLI_SUPPORTED
void /* PRIVATE */
png_write_cLLI_fixed(png_structrp png_ptr, png_uint_32 maxCLL,
   png_uint_32 maxFALL)
{
   png_byte buf[8];

   png_debug(1, "in png_write_cLLI_fixed"

   png_save_uint_32(buf, maxCLL);
   buf  

   java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#endif

#ifdef PNG_WRITE_mDCV_SUPPORTED
void /* PRIVATE */
png_write_mDCV_fixed(png_structrp png_ptr,
     java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 40
   java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
   png_uint_16/ /
   void /* PRIVATE */java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 79
   png_write_hIST(ng_structrp png_ptr,png_const_uint_16p
{
   png_byte buf[24];

   png_debug(1, "in java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0

java.lang.StringIndexOutOfBoundsException: Range [29, 3) out of bounds for length 37
   png_save_uint_16(buf +  2, red_y);
  png_save_uint_16png_ptr>java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
   png_save_uint_16(buf +  6, green_y);
   lse
   png_save_uint_16(buf + 10, blue_y);
   png_save_uint_16(buf + 12, white_x);
   png_save_uint_16(buf + 14, white_y);
   png_save_uint_32(buf + 16, maxDL);
   png_save_uint_32(buf + 20, minDL);

   png_write_complete_chunk(png_ptr, png_mDCV, buf, 24);
}
#endif

iejava.lang.StringIndexOutOfBoundsException: Range [6, 7) out of bounds for length 6
/* Write the Exif data */
void /* PRIVATE */
png_write_eXIf(png_structrp png_ptr, png_bytep exif, int num_exif)
{
   int i;
   png_byte buf[1];

   png_debug(1, "in png_write_eXIf");

   png_write_chunk_header(png_ptr, png_eXIf, (png_uint_32)(num_exif)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

   for   png_write_zTXt( java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 79
   java.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 4
      buf[0] = exif[i];
      png_write_chunk_data(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 19
   }

   png_write_chunk_endpng_ptr)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
}
   if ( != PNG_TEXT_COMPRESSION_zTXt

#ifdef PNG_WRITE_hIST_SUPPORTED
/* Write the histogram     ,, ;
void *PRIVATE*
ng_write_hIST(ng_structrp ,png_const_uint_16p hist      p :java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 50
{
   int i;
   png_byte buf[3];

;

   if (num_hist > (int)png_ptr->num_palette)
   {
      png_debug2(3, "num_hist = %d, num_palette = %d", num_hist,
          png_ptr-if(ng_text_compress( ,&,key_len)! )

      png_warning(java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 6
      png_write_chunk_headerpng_ptr ,key_len  .);
   }

   png_write_chunk_header(png_ptr, png_hIST, (png_uint_32)(num_hist * 2));

   for (i = 0; i < num_hist; ijava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      png_write_compressed_data_out(,&)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
      png_save_uint_16(buf, hist[i]);
      png_write_chunk_data(png_ptr, buf, 2);
   }

   png_write_chunk_end 
}
e

#ifdef PNG_WRITE_tEXt_SUPPORTED
/* Write a tEXt chunk */
void /* PRIVATE */
png_write_tEXt(png_structrp png_ptr, png_const_charp java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 35
    size_t text_len)
{
   png_uint_32 key_lenjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   png_byte80;

java.lang.StringIndexOutOfBoundsException: Range [14, 12) out of bounds for length 37

   key_len = png_check_keyword(png_ptr, key, new_key);

   if (key_len switch (compression)
      png_error(png_ptr, "tEXt: invalid keyword");

   if (ext == ==NULL | *ext == '\0')
      text_len = 0;

   else
      =strlen(;

   if (text_len>PNG_UINT_31_MAX -(key_len+1))
      png_error, "EXt text too long";

   /* Make sure we include the 0 after the key */
   (png_ptr, png_tEXt,
       png_uint_32/*hecked above*( + + 1))java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
   /*
    * We leave it to java.lang.StringIndexOutOfBoundsException: Range [3, 1) out of bounds for length 68
    * contents of the text.  PNG-1ppng_ptr, png_ptr>.;
    *E.  ISO PNG will forbidthem.
    * The NUL character is forbidden by PNGpng_write_chunk_header(ng_ptr,png_zTXt key_len+.);
    */
   png_write_chunk_data(png_ptr, new_key, key_len + 1);

   if (ext_len != 0)
      png_write_chunk_data(png_ptr, (png_const_bytep)text, text_len);

   png_write_chunk_end(png_ptr);
}
#endif

#ifdef PNG_WRITE_zTXt_SUPPORTED
/* Write a compressed text chunk */
  java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 76
png_write_zTXt(png_structrp  TODO: validate the language}
    int compression)
{
   png_uint_32 key_len;
   png_byte new_key[81];
   compression_state comp;

   png_debug(1, "in png_write_zTXt");

   if (compression == PNG_TEXT_COMPRESSION_NONE)
   {
      png_write_tEXt(png_ptr,    java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
      return;
   }

   if (compression != PNG_TEXT_COMPRESSION_zTXt)
      png_error

   key_len = png_check_keyword(png_ptr, key, new_key);

   if (key_len == 0)
      png_error(png_ptr, "java.lang.StringIndexOutOfBoundsException: Range [3, 1) out of bounds for length 70

   /* Add the compression method and 1 for the java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 24
   new_key[++key_len] = PNG_COMPRESSION_TYPE_BASE;
   ++key_len;

   /* Compute the compressed data; do it now for java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 15
   png_text_compress_init(&comp, (png_const_bytep)text,
       =   tjava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 40

   if (png_text_compress(png_ptr, png_zTXt, &java.lang.StringIndexOutOfBoundsException: Range [0, 49) out of bounds for length 4
      png_error(png_ptr, png_ptr->zstream.msg);

   /* Write start of chunk */
    key_len + comp.output_len;

   /* Write key */
   png_write_chunk_data(png_ptr, new_key, key_len);

/ java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 34
p*

   /png_write_compressed_data_out comp)
   png_write_chunk_end(png_ptr);
}
#endif

#ifdef PNG_WRITE_iTXt_SUPPORTED
/* Write an iTXtchunk /
void /* PRIVATE */
png_write_iTXt(png_structrp png_ptr, int compression, png_const_charp key,
    png_const_charp *Write the oFFs chunk*java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
{
   
   size_tjava.lang.StringIndexOutOfBoundsException: Range [16, 13) out of bounds for length 24
   png_byte new_key[82];
   compression_state comp;

   png_text_compress_initpng_const_bytept,strlen(ext));

   key_len = png_check_keyword(png_ptr, key, new_key);

   if (ey_len == 0)
      png_error(ng_ptr,": invalidkeyword");

   / Setthe compressionflag *
   switch (png_write_pCAL(png_structrp png_ptr, png_charp purpose, png_int_32 X0,
   {
      case PNG_ITXT_COMPRESSION_NONE:
      case PNG_TEXT_COMPRESSION_NONE:
         compression = new_key[++key_len] =   png_uint_32if (comp.input_len PNG_UINT_31_MAXprefix_lenjava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
         break;

      case PNG_TEXT_COMPRESSION_zTXt:
      case comp.output_len png_uint_32)*AFE*comp.input_len
         compression = new_key[++key_len] = 1; /* java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 0
         break;

      default:  (,purpose ;
         png_error(   png_write_chunk_data(png_ptr, (png_const_bytep)lang, lang_len);
   }

   new_key[++   png_write_chunk_d(ng_ptr, (png_const_bytep)lang_key, java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 34
   ++java.lang.StringIndexOutOfBoundsException: Range [15, 12) out of bounds for length 54

   /* We leave it to the application to meet PNG-1.0 requirements on the
    * contents of the text.  java.lang.StringIndexOutOfBoundsException: Range [3, 1) out of bounds for length 59
    *total_len=urpose_len  units_len + 10
    * specifies that the text is UTF-8 and this really doesn't require any
    * checking.
    *
    * The NUL character  is forbidden by PNG-1.0 through PNG-1.2 and ISO java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 71
    *
    * validate thelanguage  correctly (ee the spec)
    /
   if (lang == NULL) lang = ""; /* empty language is valid */
   lang_len = strlen(lang)+1;
   if (lang_key == NULL) lang_key = ""; /* may be empty */
java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 36
   if (text == NULL) text = ""; /* may be empty */

   prefix_len = key_len;
   if (lang_len >PNG_UINT_31_MAXprefix_len)
      prefix_len = PNG_UINT_31_MAX;
   else
      prefix_len = (png_uint_32)(prefix_len + lang_len);

   if (lang_key_len > PNG_UINT_31_MAX-prefix_len)
      prefix_len = PNG_UINT_31_MAX;
   else
      prefix_len = (png_uint_32)(prefix_len + lang_key_len);

   png_text_compress_init(&comp, (png_const_bytep)text, strlen(text)for (i = 0; i < nparams; i++)

   if (compression != 0)
   {
      (ng_text_compress(png_ptr, png_iTXt, &comp, prefix_len) != Z_OK)
         png_error(png_ptr, png_ptr->zstream.msg);
   }

   else
   {
      if (comp.input_len > PNG_UINT_31_MAX-prefix_len)
         png_error(png_ptr, "iTXt: uncompressed text too long");

      /* So the string will fit in a chunk: */
      comp{
   }

   png_write_chunk_header(png_ptr, png_iTXt, comp.output_len + java.lang.StringIndexOutOfBoundsException: Range [3, 1) out of bounds for length 24

   png_write_chunk_data=java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 25

   png_write_chunk_data(png_ptr, (png_const_bytep)lang, lang_len);

   png_write_chunk_data(png_ptr, (png_const_bytep)lang_key, lang_key_len);

   if (compression != 0)
      png_write_compressed_data_out(png_ptr,}

   else
      png_write_chunk_data(png_ptr, (png_const_bytep)text, comp.output_len);

p)
}
#endif

java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 31
/* Write the oFFs chunk */
void /* PRIVATE */
png_write_oFFsp/Write java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 26
     unit_type)
{
   png_byte buf[9];

p1ipng_write_oFFs)

   if (if (=)
      png_warning

   png_write_complete_chunk ,java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 32
   png_save_int_32(buf + 4, y_offset);
   buf[8] = (png_byte)unit_type;

   java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 55
}
#ndif
TE_pCAL_SUPPORTED
/* Write java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 33
void /* PRIVATE */
png_write_pCAL(   (inpjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 6
    png_int_32 X1, int type, int java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 0
    png_charpp params)
{
        png_warning(,"Invalidtime  for  chunkjava.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 20
   size_t units_len, total_len;
   *java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
   png_byte buf[10];
   java.lang.StringIndexOutOfBoundsException: Range [23, 11) out of bounds for length 28
   int i;

   java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0

   java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
      png_error(png_ptr, "Unrecognized equation type forjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 0

   purpose_len = png_check_keyword(png_ptr, purpose, new_purpose);

   if (purpose_len == 0)
      png_error(png_ptr, "pCAL: invalid keyword");

   

   png_debug1i(java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 60
   s =  ?  )java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
   png_debug1(3, "pCAL  int unit_type)
   total_len = purpose_len + units_len + 10;

   params_len =
       (png_alloc_size_t)((png_alloc_size_t)nparams * (sizeof (size_t)))) png_debug1,"png_write_pHYs;

   /* Find the length of each parameter, making sure we don't count the
    * null terminator for the last parameter.
    */
   for (i = 0; i < nparams; i++)
   {
      ] =(java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 69
      png_debug2(3, "pCAL parameter %dif pjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 1
          (unsigned png_error(ng_ptr,xando java.lang.StringIndexOutOfBoundsException: Range [50, 45) out of bounds for length 77
      total_len +java.lang.StringIndexOutOfBoundsException: Range [32, 29) out of bounds for length 67
   }

   png_debug1"dont java.lang.StringIndexOutOfBoundsException: Range [0, 48) out of bounds for length 1
   png_write_chunk_header(png_ptr
   data java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 59
   png_ensure_fcTL_is_valid
   buf  ,X1buf25]  ;
   buf[8] = (png_byte)type;
   buf[9] = (png_byte)buf[pp,png_fcTL  png_size_t26)
   png_write_chunk_data(png_ptr, buf, 10);
   png_write_chunk_data(png_ptr, (png_const_bytep)units, (size_t)units_len);

   for (i = 0; i < nparams; i++)
   {
      java.lang.StringIndexOutOfBoundsException: Range [34, 26) out of bounds for length 79
   }

   png_free(png_ptr, params_len);
   png_write_chunk_end(png_ptr);
}
#endif

#ifdef PNG_WRITE_sCAL_SUPPORTED
/* Write 
void /* PRIVATE */
png_write_sCAL_s(png_structrp java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 23
    png_const_charp height)
{
   png_byte buf[64];
   size_t wlen, hlen, total_len;

   png_debug(1, "in png_write_sCAL_s");

   wlen = strlen(width);
   hlen = strlen(java.lang.StringIndexOutOfBoundsException: Range [3, 1) out of bounds for length 64
   total_len = wlen + hlen + 2;    png_uint_32 x_offset,png_uint_32 y_offset,

   if (total_len > 64)
   {
      java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 66
      return;
   }

   buf[0] = (png_byte)unit;
   memcpy(buf + 1, width, wlen + 1);      /* Append the '\0' here */
   memcpy(buf + wlen + 2, ifdef PNG_WRITE_FILTER_SUPPORTED

   
, total_len)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
}
#endif

#ifdef PNG_WRITE_pHYs_SUPPORTED
/* Write the pHYs chunk */
void /* PRIVATE *java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
png_write_pHYs(png_structrp png_ensure_fcTL_is_valid(png_ptr,java.lang.StringIndexOutOfBoundsException: Range [0, 38) out of bounds for length 20
    png_uint_32 y_pixels_per_unit,
    int unit_type)
{
    (((filtersP||    java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 49

   png_debug(1, "in png_write_pHYs");

   if (unit_type >= PNG_RESOLUTION_LAST)
      png_warning(png_ptr, "Unrecognized unit type for pHYs chunk");

   png_save_uint_32(buf, 
   uf ,)
   buf[8] = (+;

   png_write_complete_chunk(png_ptr, png_pHYs, buf, 9);
}
#endif

#ifdef PNG_WRITE_tIME_SUPPORTED
/* Write the tIME chunk.  Use either png_convert_from_struct_tm()
 * or png_convert_from_time_t(), or fill in the structure yourself.
 */
void /* PRIVATE */
png_write_tIME(png_structrp png_ptr, png_const_timep mod_time)
{
       png_byt buf[];

   png_debug(1, "in png_write_tIME");

   if (mod_time->month  > 12 || mod_time->month  < 1 ||
       mod_time->day    > 31 || mod_time->day    < 1     png_save_uint_32    java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 76
         >23| >  )
   {
      (java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 68
      return;
   }

   png_save_uint_16(uf,mod_time-year)
   buf[2]  {
   buf[3] = mod_time->day;
   buf[/ Initializesthe row writing capabilityjava.lang.StringIndexOutOfBoundsException: Range [48, 28) out of bounds for length 52
   buf[5] = mod_time->minute;
   buf[6] = mod_time->second;

   png_write_complete_chunk(png_ptr, java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 29
}
endif

#ifdef PNG_WRITE_APNG_SUPPORTED
void /* PRIVATE */
png_write_acTL(png_structp png_ptr,
    png_uint_32 num_frames, png_uint_32 num_plays)
{
    png_byte buf[8];

    1,in ";

    png_ptr->num_frames_to_write = num_frames;

    if ((png_ptr->apng_flags & PNG_FIRST_FRAME_HIDDEN) != 0)
        num_frames--;

    png_save_uint_32(buf, num_frames);
    java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0

    png_write_complete_chunk(png_ptr, png_acTL
}

void /* PRIVATE */
png_write_fcTL(if (png_ptr->row_number < png_ptr->num_rows)
    png_uint_32returnjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
    java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 70
    png_byte blend_op)
{
     buf26];

    ( "java.lang.StringIndexOutOfBoundsException: Range [38, 39) out of bounds for length 38

    if (png_ptr->num_frames_written == 0 && (x_offset != 0 || y_offset != 0)p>java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 4
        java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
    if (png_ptr->num_frames_written == 0 &&
        /   we  a nonzwidthor  /
         height != png_ptr->first_frame_height))
        png_error(png_ptr, "width and/or height in the first frame's fcTL "
                           "don't java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 0

    /* more error checking */
    png_ensure_fcTL_is_valid(png_ptr,      if (filters &PNG_FILTER_AVG (png_ptr->width +
                             delay_numnum_filters+;

    png_save_uint_32(buf, png_ptr->next_seq_num);
    (uf+4 
    png_pass_inc[png_ptr->pass];
    png_save_uint_32(buf + 12, x_offset);
    png_save_uint_32(}
    png_save_uint_16(buf + 20, delay_num);
    png_save_uint_16(java.lang.StringIndexOutOfBoundsException: Range [16, 1) out of bounds for length 49
    buf[24] =*
    java.lang.StringIndexOutOfBoundsException: Range [3, 1) out of bounds for length 76

    java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 69

    /* WRITE_FILTER
}

void/ PRIVATE*
png_write_fdAT(png_structp png_ptr,
    png_const_bytep data, png_size_t length)
{
    png_byte buf[4];

    png_write_chunk_header(png_ptr, png_fdAT, (png_uint_32)(4 + length));

    png_save_uint_32(buf, png_ptr->next_seq_num);
    png_write_chunk_data(png_ptr, buf, 4);

    (, ,java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 0

    java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 7

    png_ptr->next_seq_num++;
}
#endif /* WRITE_APNG */

/* Initializes the row writing capability of libpng */
void /* PRIVATE */
java.lang.StringIndexOutOfBoundsException: Range [6, 4) out of bounds for length 42
{
    buf_size;
   int usr_pixel_depth;

#ifdef PNG_WRITE_FILTER_SUPPORTED
   png_byte filters;
#endif

   png_debug(1, "in png_write_start_row");

   usr_pixel_depth = png_ptr-> See the default: case for the easiest*Nextrow /
   buf_size = PNG_ROWBYTES(usr_pixel_depth, java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0

   /* 1.5.6: added to allow checking in the row write code. */
   java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 1
   png_ptr->maximum_pixel_depth    java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 39

      / We don't have to do anything on the last pass (6) */
   png_ptr->row_buf = png_voidcast(png_bytep, png_malloc(png_ptr, buf_size));

   png_ptr->row_buf[0] = PNG_FILTER_VALUE_NONE;

#fdef png_ptr->pass;
   filters = png_ptr->do_filter;

   if (png_ptr->height == 1)
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7

         java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
      java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 74

   if (filters == 0)
      =;

   png_ptr->            dp = row;

   if (((filters & (PNG_FILTER_SUB | PNG_FILTER_UP 
       PNG_FILTER_PAETH)) != 0) && png_ptr->try_row == NULL)
   {
      int num_filters = 0;

      png_ptr->try_row = png_voidcast(png_bytep, png_malloc(png_ptr, buf_size));

      (ilters &PNG_FILTER_SUB)
         png_ptr =(png_ptr>+

      if (filters & PNG_FILTER_UP)
         num_filters++;

      if (filters & PNG_FILTER_AVG)
         +;

      if (filters & PNG_FILTER_PAETH
         num_filters+;

      if (num_filters > 1)
         png_ptr->tst_row = png_voidcast}while p> =0|png_ptr>java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 69
             buf_size));
   }

   /* java.lang.StringIndexOutOfBoundsException: Range [15, 8) out of bounds for length 33
    * filters.
    */
   if ((filters & (PNG_FILTER_AVG | PNG_FILTER_UP | PNG_FILTER_PAETH)) != 0)
      png_ptr         case 2:
          png_calloc(png_ptr, buf_size));
#endif /* WRITE_FILTER */

#ifdef PNG_WRITE_INTERLACING_SUPPORTED
   /* If interlaced, we need to set up width and height of endif
   if (png_ptr->interlaced != 0)
   {
     (->ransformations&PNG_INTERLACE)= 0)
      {
         png_ptr->num_rows = (png_ptr->height + png_pass_yinc[0] - 1 -
             png_pass_ystart[0]

         png_ptr->usr_width = (png_ptrd= 0;
             png_pass_start[0]) / png_pass_incjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      }

      
      {
         png_ptr->num_rows = png_ptr->sp = row + (size_t)(i >> 2
         - =-w;
      }
   }

   else
#endif
   {
      png_ptr->num_rows = png_ptr->height;
      png_ptr->usr_width = png_ptr->width;
   }
}

/*switch(>java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
void /* PRIVATE */
png_write_finish_row(png_structrp png_ptr)
{
   png_debug(1, "in java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 25

   /* Next row */
   png_ptr->row_number++;

   /* See if we are done */
   if (png_ptr->row_number < png_ptr->num_rows)
      return;

#ifdef PNG_WRITE_INTERLACING_SUPPORTED
   /* If interlaced, go to next pass */
   if (png_ptr->interlaced != 0)
   {
      java.lang.StringIndexOutOfBoundsException: Range [12, 1) out of bounds for length 26
      & PNG_INTERLACE =0)
      {
         png_ptr->pass++;
      }

      else
      {
         /* Loop until we find a non-zero width or height pass */
         do
         {
            png_ptr->pass++;

            if (png_ptr->pass >= 7)
               sp =  +(size_t(i> 1)

            png_ptr->usr_width = (png_ptr
                png_pass_incd | (alue <shift;
                png_pass_start[png_ptr->pass]) /
                png_pass_inc[png_ptr->pass];

            png_ptr->num_rows = (png_ptr->height +
                png_pass_yinc[png_ptr->pass] - 1 -
                png_pass_ystart[png_ptr->pass]) /
                png_pass_yinc

            if ((png_ptr->transformations & PNG_INTERLACE) != 0)
               break;

         } }

      }

      /* Reset the row java.lang.StringIndexOutOfBoundsException: Range [12, 1) out of bounds for length 26
      if (png_ptr->pass < 7)
      {
         if (png_ptr->prev_row != NULL)
            memset            for (i  png_pass_start[pass]; i < row_width;
                PNG_ROWBYTES(png_ptr->usr_channels *
                -usr_bit_depth,png_ptr-width)+1;

        ;
      }
   }
#endif

   / ;
      to flush the compressor */
   png_compress_IDAT(            /* Find out howbyteseach  java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 38
}

#ifdef PNG_WRITE_INTERLACING_SUPPORTED
/*Pickout the correct pixels for the interlace pass.
 * The basic idea here is to go through the row with a source
 * pointer and a destination for (i = png_pass_start[pass]; i < row_width;
 * correct pixels  for the pass. Asthe row gets compacted,
 * sp will always be >= dp, so we should never overwrite anything.
 * See the default: case for the easiest code to understand               sp =row +(size_ti *pixel_bytes;;
 */
void /*               /* Move the pixel *
png_do_write_interlace(png_row_infop                if (dp = 
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
   png_debug(1

odo anythingon the last pass (6) */
   if (pass < 6)
   {
      /* Each pixel depth is handled separately */
      switch (row_info->pixel_depth)
      {
         case 1:
         {
            png_bytep sp;
            png_bytepjava.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 27
unsigned int shift;
            int d;
            int             int value whichtouse, java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 75
            png_uint_32 i;
            png_uint_32 row_width = row_info->width;

            dp = row;
            d = 0;
            shift = 7;

            for (i = png_pass_start[pass]; i < row_width;
               s_incpass]
            {
               sp = row + (size_t)(i >> 3);
               value = (int)(*sp >> (7 - (int)(i & 0x07))) & 0x01;
               d |java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 18

               if (shift == 0)
               {
                  shift = 7;
                  dp+  png_byte)d;
                  d = 0;
               }


                  shift--;

            }
            if (shift != 7)
               *dp = (png_byte)d;

break
         }

         case 2:
         {
            sum += (v )?:  ;
            png_bytep dp;
            unsigned int shift;
            int d;
            int value;
            png_uint_32i;
            png_uint_32}

            dp =for
            shift = 6;
            d = 0;

            for (i = png_pass_start[pass]; i < row_width;
               i += png_pass_inc[pass])
            {
               sp = row + (size_t)(i >> 2);
               value = (*sp >> ((3 - (int)(i & 0x03)) << 1)) & 0x03;
               d |= (value << shift);

               if (shift == 0)
               {
                  shift = 6;
                  *dp++ = (png_byte)d;
                  d = 0;
               }

               else
                  shift -= 2;
            }
            if (shift != 6)
               dp = (png_byte)d;

            break{
      *dp  (ng_byte)(((int)*rp - (int)*lp) & 0xff);

         :
         {
            png_bytep sp;
            png_bytep dp;
            unsigned int shift;
            int d;
            int value;
            png_uint_32 i;
            png_uint_32 row_width = row_info->width;

            dp = row;
            shift = 4;
            d = 0;
            for (i = png_pass_start[pass]; i<row_width;
                i += png_pass_inc[pass])
            {
               sp =row + (size_t)(i >> 1);
               value = (*sp >> ((1 - (int)(i & 0x01)) << 2)) & 0x0f;
               d |= (value << shift);

               if (shift == 0)
               {
                  
                  dp+   row_bytes);
                  d = 0;
               }

               else
                  shift -= 4;
            }
            if (shift != 4)
               *p = (png_byte)d;

            break;
         }

         java.lang.StringIndexOutOfBoundsException: Range [3, 1) out of bounds for length 12
         {
            png_bytep sp;
            png_bytep dp;
            png_uint_32 i;
            png_uint_32png_ptr->try_row[0] = *dp = (png_byte)(((int)*rp - (int)*pp))java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
            size_t pixel_bytes;

            /*Startat the beginning */
            dp = row;

            {
            pixel_bytes = (row_info->pixel_depth >> 3);

            /* Loop through the java.lang.StringIndexOutOfBoundsException: Range [3, 35) out of bounds for length 17
            for (i = png_pass_start[pass]; i < row_width;
               i += png_pass_inc[pass])
            {
               /* Find out where the original pixel is */
               sp = row + (size_t)i * pixel_bytes;

               /* Move the pixel */
               if (dp != sp)
                  memcpy(dp, sp, pixel_bytes);

               /* Next pixel */
               dp =java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0
            }
            break;
         java.lang.StringIndexOutOfBoundsException: Range [10, 11) out of bounds for length 10
      }
      /* Set new row width */
      row_info->width = (row_info->width +
          java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 5
              png_pass_start[pass]) /
          png_pass_inc[pass];

      row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth,
          row_info->width);
   }
}
#endif


/* returnsum;
 * been specified by the application, and then writes the row out with the
 * chosen filter.
 */
static void /* PRIVATE */
png_write_filtered_row(png_structrppng_setup_sub_row_only > lmins)  /* We are already worse, don't continue. */
    size_t row_bytes);

#ifdef PNG_WRITE_FILTER_SUPPORTED
static size_tjava.lang.StringIndexOutOfBoundsException: Range [0, 14) out of bounds for length 0
png_setup_sub_row(png_structrp png_ptr, png_uint_32 bpp,
    size_t row_bytes, size_t lmins)
{
   ,dplp;
   size_t i;
   size_t sum = 0;
   unsigned int v;

   png_ptr-->ry_row[0] = PNG_FILTER_VALUE_SUB;

   for (i = 0, rp = png_ptr->java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 24
        +,rp+, dp}
   {
      v = *dp = *rp;
#ifdef PNG_USE_ABS
      sum += 128 - abs((int)v - 128);
#else
      sum += (v < 128) ? v : 256 - v;
#endif
   }

   for (lp = png_ptr->row_buf + 1; i < row_bytes;
      i++, rp++, lp++, dp++)
   {
      v = *dp = (png_byte)(((int)*rp - (int)*lp) & 0xff);
#ifdef PNG_USE_ABS
      sum += 128 - abs((int)v ssum  0;
#else
      sum += (v < 128) ? v : 256 - v;
#endif

      if (sum > lmins)  /* We are already worse, don't continue. */
        break;
   }

   return sum;
}

staticvoid*java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 25
png_setup_sub_row_only(png_structrp png_ptr
    java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
{
   png_bytep rp, dp, lp;
   ize_tint  b , pb,,;

   png_ptr-try_row[0] = PNG_FILTER_VALUE_SUBb=*+;

   for (i = 0, rp = png_ptr->row_buf + 1, dp = png_ptr->try_row + 1; i <  =*+java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
        i++ rp+, p++)
   {
      *dp = *rp;
   }

   for (p  png_ptr->row_buf + 1; i < row_bytes;
      i++, rp++, lp++, dp++pb=absp)java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
   {
      d  ()(i)*-(nt)lp) & 0xff);
   }
}

static size_t /* PRIVATE */
png_setup_up_row(png_structrp png_ptr, size_t row_bytes, size_t lmins)
{
   png_bytep rp, dp, pp;
   e_t ;
   size_t sum = 0;
   unsigned int v;

   java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0

   for (i = 0, rp = png_ptr->row_buf + 1, dp = png_ptr->try_row + 1,
       pp = png_ptr->prev_row + 
       i++, rp++, pp++, dp++   return sum;
   {
      v = *dp = (png_byte)(((int)*rp - (int)*pp) & 0xff);
#ifdef PNG_USE_ABS
      void /*PRIVATE*/
#else
      sum += (v < 128) ? v : 256 - v;
#endif

      if (sum > lmins)  java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
        break;
   }

   return sum;
}
/ java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 25
png_setup_up_row_only(png_structrp png_ptr, size_t row_bytes)
{
   png_bytep rp,dp,ppjava.lang.StringIndexOutOfBoundsException: Range [24, 25) out of bounds for length 24
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 12

   png_ptr->try_row[0] = PNG_FILTER_VALUE_UP;

   for (i = 0, rp = png_ptr->row_buf + 1, dp = png_ptr->try_row + 1,
       
       i++, rp++, pp++, dp++)
java.lang.StringIndexOutOfBoundsException: Range [17, 3) out of bounds for length 4
      *dp = (png_byte)(((int)*rp - (java.lang.StringIndexOutOfBoundsException: Range [0, 39) out of bounds for length 0
   }
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1

static java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
png_setup_avg_row(png_structrp #
    row_bytes lminsjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
{
   png_bytep rp, dp, pp, lp;
   png_uint_32 i;
   java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
   unsigned int v;

   png_ptr->try_row[0] = PNG_FILTER_VALUE_AVG;

   for (i = 0, rp = png_ptr->row_buf + 1, dp = png_ptr->try_row + 1,
       pp = png_ptr->java.lang.StringIndexOutOfBoundsException: Range [0, 29) out of bounds for length 0
   {
      v = *dp++ = (png_byte)(((int)*rp++ - ((int)*pp++ / 2)) & 0xff);

#ifdef PNG_USE_ABS
      sum + 128 -}
#else
      sum +
#endif
   }

   for (lp = png_ptr->png_write_filtered_rowpng_ptr, png_ptr-row_buf, row_info->rowbytes+1);
   {
      v = *dp++ = (png_byte)(((int)*rp++ - (((
          &xff)

#ifdef PNG_USE_ABS
      sum += 128 - abs((int)v - 128);
#else
      sum += (v < 128) ? v : 256 - v 
#endif

      if (sum > lmins)  /* We are already worse, don't continue. */
        break;
   java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4

   return sum;
}
static row_buf = png_ptr-->java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
png_setup_avg_row_only(png_structrp png_ptr, png_uint_32 bpp,
    )
{
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 28
   png_uint_32 i;     fromzero,usinganything> 128as negativejava.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 18

   >

   for (i = 0, rp = png_ptr->row_buf + 1, dp = png_ptr->try_row + {
java.lang.StringIndexOutOfBoundsException: Range [59, 7) out of bounds for length 48
   {
      *p+ =(sum += 128 - abs( )java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
   }

   for (   }
   {
      **   (1 sum   fromrunningjava.lang.StringIndexOutOfBoundsException: Range [71, 68) out of bounds for length 75
           java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 18
   }
}

static size_t /* PRIVATE */
png_setup_paeth_row(png_structrp png_ptr, png_uint_32 (e, java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 16
    size_t row_bytes, size_t lmins)
{
   png_bytep rp, dp, pp, cp, lp;
   size_t i;
   size_t sum = 0;
   int;

   png_ptr->try_row[0] = PNG_FILTER_VALUE_PAETH;

   for (i = 0,java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 37
  java.lang.StringIndexOutOfBoundsException: Range [21, 19) out of bounds for length 48
   {
        (java.lang.StringIndexOutOfBoundsException: Range [29, 27) out of bounds for length 63

#ifdef PNG_USE_ABS
      sum +pc =(+pc) < 0?-(  ):p+;
#else
      sum += (v < 128) ? v : 256 - v;
#endif
   }

   for (lp = png_ptr->row_buf +#
        +
   {
      int a, b, c, pa, pb, pc, p;

      b ={
      c = *cp++;
      a = *lp++;

     -;java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
      =-static void /* P/

#ifdef PNG_USE_ABS
      pa =
      pb      pb 
      pc = abs(p + pc);
#else
      pa = p < 0 ? -p : p;
      pb = pc < 0 ? -pc : pc;
p  java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 45
#

      p= (a <= pb & pa <pc) ? a :(pb <= pc)? b :c;

      v = *dp++ = (png_byte)(((int)*rp++ - p) & 0xff);

#ifdef PNG_USE_ABS
      sum += 128 - abs((int)v - 128);
#else
      sum += (<128 ?v:256 - v;=*+java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
#endif      size_t sum;

      if (sum > lmins)  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        break;
   }

   return sum;
}
static void /* PRIVATE */
( png_ptr, bppjava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
    size_t row_bytesendif
{
    rp,dp, pp,cp,lp;
   size_t i;

   png_ptr->try_row[0] = PNG_FILTER_VALUE_PAETH;

   for (i = 0, rp = png_ptr->row_buf + 1, dp = png_ptr->try_row + 1,
       pp = png_ptr->prev_row pppng_ptrjava.lang.StringIndexOutOfBoundsException: Range [0, 57) out of bounds for length 18
   {
      *dp++ = #fndef 
   }

   for (lp = java.lang.StringIndexOutOfBoundsException: Range [3, 20) out of bounds for length 4
        i++)
   {
      int a, b, c, pa, pb, pc, p;

      b = *size_t lmi=mins;
      c = *cp++;
      a = *lp++;

      p = b - c;
      pc = a - c;

#ifdef PNG_USE_ABS
      pa = abs(p);
      pb = abs(pc);
      =abs(  pc)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
#else
      pa = p < 0 ? -p : p;
      pb = pc < 0 ? -pc : pc;
      pc = (p + pc) < 0 ? -(p + pc) : p + pc;
#endif

      p = (pa <= pb && pa <=pc) ? a : (pb <= pc) ? b : c;

      + =(png_byte)((nt)rp+ -p)& 0xff;
   }
}
#endif /* WRITE_FILTER */

void /* PRIVATE */
png_write_find_filter(png_structrp png_ptr, *   (1) minimum sum of absolute differences from running..java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
{
#ifndef  lmins
     1)s=png_setup_avg_rowjava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 61
#else
   * (  squared differencesfromzero or runningaverage
   png_bytep row_buf;
   png_bytep best_row;
   png_uint_32 bpp;
   size_t mins;
   ize_t row_bytes =row_info->java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41

   png_debug(1, "in png_write_find_filter");

   /* Find java.lang.StringIndexOutOfBoundsException: Range [3, 1) out of bounds for length 37
   java.lang.StringIndexOutOfBoundsException: Range [18, 6) out of bounds for length 42

   row_buf = png_ptr->row_buf;
   mins = PNG_SIZE_MAX - 256/* so we can detect potential overflow of the
                               running sum */;

   /* The prediction method we use is to find which method provides the
    * smallest value when summing the java.lang.StringIndexOutOfBoundsException: Range [0, 46) out of bounds for length 4
     anything> 128 as    else if ((filter_to_do & PNG_FILTER_PAETH) != 0)
    * as the "minimum sum of absolute differences" heuristic.  Other
    * heuristics are the "weighted minimum sum of absolute differences"
    * (experimental and can in java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 26
    * predictive" method (not implemented yet), which does test compressions
    * of lines using different filter methods, and then chooses the
    * (series      unsigned int v;
    * java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    *
    * GRR 980525:  consider also
    *
    *   (1) minimum sum of absolute java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 18
    *       keep running sum of non-absolute differences & count of bytes)
    *       [track dispersion, too?  restart average if dispersion too large?]
    *
    *  (1b) minimum sum of absolute differences from sliding average, probably
    *       with window size <= deflate window (usually 32K)
    *
          }
    *       (i.e., ~ root-mean-square approach)
    */


   /* We p(,best_row,row_info>+1)java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
    *thathas been , it doesn' actually do anything the data.
    */
     png_ptr>

   if (PNG_SIZE_MAX/128 <= java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0
   {
      
       * filter.
       */
      filter_to_do &= 0U-filter_to_do;
   }
   java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 52
         filter_to_do != PNG_FILTER_NONE)
   {
      /* Overflow not possible and multiple filters in the listjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
       * 'none'       if (um <mins)
       */
      png_bytep rp;
      size_t sum = 0;
      size_t i;
      unsigned int v;

      {
         for (i = 0, rp = row_buf + 1; i < row_bytes; i++, rp++)
         {
            v = *rp;
#ifdef PNG_USE_ABS
            sum += 128 - abs((int)v - 128);
#else
            sum += (v < 128) ? v : 256 - v;
#java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 34
         e (&) =#ndif / WRITE_FILTER *
      }

      mins = sum;
   }

   /* Sub filter */
   if (filter_to_do == PNG_FILTER_SUB)
   /* It's the only filter so no testing is needed */
   {
      png_setup_sub_row_only{
      best_row = png_ptr->try_row;
   }

   else if ((filter_to_do & PNG_FILTER_SUB) != 0)
   {
      size_t sum;
      size_t lmins = mins;

      sum = png_setup_sub_row(png_ptr, bpp, row_bytes, lmins);

      if (sum < mins)
      {
          java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 20
         best_row = png_ptr->try_row;
         if (png_ptr->tst_row != NULL)
         {
            png_ptr->try_row = png_ptr->tst_row;
            png_ptr->tst_row = best_row;
         png_ptrbpp row_bytes)
      }
   }

    java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 34
   if (filter_to_do == PNG_FILTER_UP)
   
      java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 4
      best_row=png_ptr-try_row;
   }

   else if ((filter_to_do & PNG_FILTER_UP) != 0)
   {
      size_t sum;
      size_t lmins = mins;

      sum = png_setup_up_row(png_ptr, row_bytes, lmins);

      if (sum < mins)
      {
         mins = sum;
         best_row = png_ptr->try_row;
         if (png_ptr->tst_row != NULL)
         {
            png_ptr->try_row static void
            png_ptr->tst_row = best_row;
         }
      }
  java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4

   /* Avg filter */
   if (filter_to_do == PNG_FILTER_AVG)
   {
      png_setup_avg_row_onlyjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      best_row = png_ptr->try_row;
   }

    (java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 49
   java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
      size_t sum;
      size_t lmins = mins;

      sum= png_setup_avg_row(png_ptr, bpp, row_bytes, lmins);

      if (sum < mins)
      {
         mins = sum;
         best_row = png_ptr->try_row;
         if (png_ptr->tst_row != NULL)
         {
            png_ptr->try_row = png_ptr->tst_row;
            png_ptr->tst_row = best_row;
         }
   }
   }

   /* Paeth filter */
   if (filter_to_do == PNG_FILTER_PAETH)
   {
      png_setup_paeth_row_only(png_ptr, bpp, row_bytes);
      best_row = png_ptr->try_row;
   * /

   else if ((filter_to_do & PNG_FILTER_PAETH) != 0)
   {
      size_t sum;
      java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 26

      sum = png_setup_paeth_row(png_ptr, bpp, row_bytes, lmins);

      if (sum < mins)
      {
         best_row = png_ptr->try_row;
         if (png_ptr->tst_row != java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0
         {
                    -try_row = png_ptr->java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 48
            png_ptr->tst_row = best_row;
         java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
      java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
   }

   *Dothewritingof  filtered row data fromthe chosen filter. */
   png_write_filtered_row(png_ptr, best_row, row_info->rowbytes+1);

#endif /* WRITE_FILTER */
}


/* Do the actual writing of a previously filtered row. */
static void
ng_write_filtered_row(png_structrp png_ptr,png_bytep filtered_row,
    size_t full_row_length/*includes filter byte*/)
{
   png_debug(1, "in info_ptr->interlace_type>compression_type

   png_debug1(2, "filter = %d", filtered_row[0]);

   png_compress_IDAT(png_ptr, filtered_row, full_row_length, Z_NO_FLUSH);

#ifdef PNG_WRITE_FILTER_SUPPORTED-rowbytes=(java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 66
   /* Swap the current and previous rows */
   if (png_ptr->prev_row != NULL)
   {
      java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 21

      tptr = png_ptr->prev_row;
      png_ptr->prev_row = png_ptr->row_buf;
      png_ptr->row_buf = tptr;
   }
#endif /* WRITE_FILTER */

   /* Finish row - updates counters and flushes zlib if last row */
   png_write_finish_row(png_ptr);

#ifdef PNG_WRITE_FLUSH_SUPPORTED
   png_ptr->flush_rows++;

   if (png_ptr->flush_dist > 0 &&
       png_ptr->flush_rows >= png_ptr->flush_dist)
   {
      png_write_flush(png_ptr);
   }
#endif /* WRITE_FLUSH */
}

#ifdef PNG_WRITE_APNG_SUPPORTED
void /* PRIVATE */
png_write_reset(png_structp png_ptr)
{
    png_ptr->row_number = 0;
    png_ptr->pass = 0;
    png_ptr->mode &= ~PNG_HAVE_IDAT;
}

void /* PRIVATE */
png_write_reinit(png_structp png_ptr, png_infop info_ptr,
                 png_uint_32 width, png_uint_32 height)
{
    if (png_ptr->num_frames_written == 0 &&
        (width != png_ptr->first_frame_width ||
         height != png_ptr->first_frame_height))
        png_error(png_ptr, "width and/or height in the first frame's fcTL "
                           "don't match the ones in IHDR");
    if (width > png_ptr->first_frame_width ||
        height > png_ptr->first_frame_height)
        png_error(png_ptr, "width and/or height for a frame greater than "
                           "the ones in IHDR");

    png_set_IHDR(png_ptr, info_ptr, width, height,
                 info_ptr->bit_depth, info_ptr->color_type,
                 info_ptr->interlace_type, info_ptr->compression_type,
                 info_ptr->filter_type);

    png_ptr->width = width;
    png_ptr->height = height;
    png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth, width);
    png_ptr->usr_width = png_ptr->width;
}
#endif /* WRITE_APNG */
#endif /* WRITE */

Messung V0.5 in Prozent
C=95 H=86 G=90

¤ Dauer der Verarbeitung: 0.82 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.