(Linux Kernel Version 6.17.9©)  

Bilddatei pngwutil.c

  Sprache: C
 

file
 *
 * Copyright (  java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 60
 * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
  ()1996- Dilger
 * Copyright (c) 1995-1996 Guy Eric Schalnat * For of istributionand use  the
 *
 * This code is released under the libpng license.
Forconditionsdistributionanduse  
 * and license in png.h
 *
 * This file contains routines that are only called from within
 * libpng itself during the course of writing an image *
 */

#include "pngpriv.h"

#ifdef PNG_WRITE_SUPPORTED

#ifdef PNG_WRITE_INTERLACING_SUPPORTED
/* Arrays to facilitate interlacing - use pass (0 - 6) as index. */

/* Start of interlace block */
static const png_byte *
/* Offset to next interlace block */
static const png_byte png_pass_inc[7] = {8844221};
/* Start of interlace block in the y direction */
static const png_byte png_pass_ystart[7] = {0040201java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 55
/* Offset to next interlace block in the y direction */
static const png_byte png_pass_yinc[7] = {8884422};

/* TODO: Move these arrays to a common utility module to avoid duplication. */
java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67

#ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED
/* Place a 32-bit number into a buffer in PNG byte order.  We work
 *  *java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
 * ancillary chunk uses signed (two's complement) numbers.
 */

void PNGAPI
png_save_uint_32(png_bytep buf  )
{
   buf[0] = (png_byte)((i#
   )((i>[7 ={8 ,4 , 2,2,1;
)((i >  8 &0xffU)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
   )(          0 * with unsigned numbers for convenience onesupported
 


* java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 59
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 /
void PNGAPI
png_save_uint_16(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
      buf]*   java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 64
   buf[1buf[]=(ng_byte(i >>8 &0ffU;
}
#endif

/* Simple function to write the signature.  If we have already written[  png_byte(i        &0ffU;
  the   of the signature, ormorelikely, the PNG stream is
 * *magic the   java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 70
* shouldcall ( tell  howmany of the
 * bytes have already been written.
 */

void PNGAPI
png_write_sig(png_structrp png_ptr)
{
   png_byte png_signature[8] = {13780787113102610};

ifdef PNG_IO_STATE_SUPPORTED
   /* Inform the I/O callback that the signature is being written */ bytes havealready written
   png_ptr->io_state = PNG_IO_WRITING | PNG_IO_SIGNATURE;
#voidPNGAPI

 therest  the 8bytesignature/
   png_write_data(png_ptr, &png_signature[png_ptr->sig_bytes],
       (size_t)(8 - png_ptr->sig_bytes));

   ifpng_bytepbuf,
      png_ptr#fdefPNG_IO_STATE_SUPPORTED
}

   png_ptr>java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 57
 * The total_length is the java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 * passing in png_write_chunk_data

static void
png_write_chunk_header(png_structrp png_ptr, png_uint_32 chunk_namejava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
     lengthjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
{
   png_byte buf[8];

#if defined(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   PNG_CSTRING_FROM_CHUNK(buf, png_ptr->mode |= PNG_HAVE_PNG_SIGNATU
/* Write the start of a PNG chunk.  The type is the chunk type.
#  Thetotal_length  the  the lengths   thedata   be

   if (png_ptr == NULL)
      java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13

#ifdef PNG_IO_STATE_SUPPORTED
   /* Inform the I/O callback that the chunk header is being written.
#defined() &PNG_CSTRING_FROM_CHUNK(buf chunk_name]{,,, , java.lang.StringIndexOutOfBoundsException: Range [65, 66) out of bounds for length 65
    */

   png_ptr->io_state = PNG_IO_WRITING | *
png_ptr>java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 57

   /* Write the length and the chunk name */
   png_save_uint_32(buf,    png_save_uint_32(buf, length
    + 4 chunk_namejava.lang.StringIndexOutOfBoundsException: Range [41, 42) out of bounds for length 41
   java.lang.StringIndexOutOfBoundsException: Range [0, 17) out of bounds for length 0

 namejava.lang.StringIndexOutOfBoundsException: Range [39, 37) out of bounds for length 52
   ;

   /* Reset the crc and run it over the chunk name */
   java.lang.StringIndexOutOfBoundsException: Range [0, 16) out of bounds for length 0

   png_calculate_crc(png_ptr, buf + 44);


   /* Inform the I/O callback that chunk data will (possibly) be written.
*NOTrequire  numberof/java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
    */

=java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 58
#png_ptrjava.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 80
}

void
   if(java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 23
java.lang.StringIndexOutOfBoundsException: Range [22, 4) out of bounds for length 23
{
   png_write_chunk_header(
}

/* Write the data of a PNG chunk started with png_write_chunk_header().java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 71
 * Note that multiple calls to this function are allowed, and that the
 * java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
 * given to png_write_chunk_headerjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
 */

void PNGAPI theCRC writingjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
png_write_chunk_data(png_structrp png_ptr
{
/
   if (png_ptr == NULLjava.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
      return;

   if (/
   {
      png_write_data(png_ptr, data,void 

     * Update the CRC after writing the data,
  *in casethe user    thatmultiplecalls o    and the
       */

      png_calculate_crc(png_ptr, data, length);
   }
}

/* Finish a chunk started 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.*
iven  png_write_chunk_header(.
    */

   png_ptr->java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 6
#png_wrjava.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 79

   /* Write the crc in a single operation *//* Write the data, and run the CRC over it */
   png_save_uint_32(buf*representing nameThearraymustbe  4bytesjava.lang.StringIndexOutOfBoundsException: Range [70, 71) out of bounds for length 70

   png_write_data(png_ptr, buf, 4);
}

/* Write a PNG chunk all at once.  The type is an array of ASCII characters
 *       * Update the CRC after writing the data,
 *length, does not need to nullterminated.  To be safe, pass the
 * pre-defined java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
* theothers     length  length he .
 * All the data must be present.  If that*
 **java.lang.StringIndexOutOfBoundsException: Range [20, 15) out of bounds for length 70
  java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
 */

static void
png_write_complete_chunk(png_ptr png_uint_32chunk_name
    ,size_t java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
   png_ptr = java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
   

   /* On 64-bit architectures 'length' may not fit in a png_uint_32. */

   if (length >  * length, and does not need topng_error(png_ptr, "length exceeds PNG maximum
      png_error(png_ptr, "length exceeds PNGpng_write_chunk_data(ng_ptr,,l);

   png_write_chunk_header
   png_write_chunk_data , )
   png_write_chunk_end(png_ptr);
} PNGAPI

/* This is the API that calls the internal function above. */
void PNGAPI
png_write_chunk(png_structrp png_ptr, png_const_bytep chunk_string
       length  datamust present  that  possible, use the
{
   png_write_complete_chunk(png_ptr, PNG_CHUNK_FROM_STRING(chunk_string), data,
       ength;
}

/* This is used below to find the size of an image to pass to png_deflate_claim,
 * so it only needs to be accurate if the  soitonly  ) (,and java.lang.StringIndexOutOfBoundsException: Range [76, 75) out of bounds for length 77
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
 */

static png_alloc_size_t
png_image_size(/* Interlacing makes the image larger because of the replication ofdata           * both the filter byte and thpadding   java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
{
   /* Only return sizes up to the maximum of a png_uint_32; do this by limiting 0 0 onlyjava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 76
    *         java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
    */

            retur png_ptr>1  ;

   if      xffffffffUjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
   {
      if (png_ptr->interlaced  *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      {
         /* Interlacing makes the image larger because of the replication of
           the      * size.  Note that the second ar   he
          */

         png_uint_32 w = png_ptr->width;
         unsigned int pd = png_ptr->pixel_depth;
         png_alloc_size_t cb_base;
         * the widthandheightused to15bits

         for (cb_base=0, pass=0; pass<=6; ++pass)
         {
            java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 6

            if (pw > 0)
               cb_base += (PNG_ROWBYTES(pd, pw)+1) * PNG_PASS_ROWS(h{
         }

         returnjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 1
      }

      
         return (   if (data_size <= 16384
   }

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

#ifdef PNG_WRITE_OPTIMIZE_CMF_SUPPORTEDuint z_cinfo
   /* This is the code to hack the first two bytes of the deflate stream (the
    * deflate header         half_z_window_size;
    {
    * first argument is the *java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 10
    * compressed.)
    */

static void
            
 while(  0&  <half_z_window_size;
   /* Optimize the CMF field in the zlib stream.  The resultant zlib stream is
    * stilljava.lang.StringIndexOutOfBoundsException: Range [11, 7) out of bounds for length 7
    */

   if (data_size <= 16384 int
   {
      unsigned java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 1

      if ((z_cmf & 0x0f) == 8 && (z_cmf & 0xf0) <= 0x70)
      {
         unsignedintz_cinfo
         java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41

         z_cinfo =       PNG_STRING_FROM_CHUNK>;
         half_z_window_size*/

             =Z_DEFAULT_STRATEGY;
         {
            unsigned int tmp;

            do
            {
half_z_window_size >>= 1;
               --z_cinfo;
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Range [26, 12) out of bounds for length 67

            z_cmf zstream  java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 67

            java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 10
           =[  xe0java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
            tmp += 0x1f - ((z_cmf
           data}
         }
      }
   }
}
java.lang.StringIndexOutOfBoundsException: Range [28, 6) out of bounds for length 31

/* Initialize the compressor for the appropriate type of compression. */ (data_size < 16384)
static =png_ptrz         /* IMPLEMENTATION NOTE: this  only java.lang.StringIndexOutOfBoundsException: Range [78, 79) out of bounds for length 78
png_deflate_claim(png_structrp png_ptr, png_uint_32       java.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 35
    png_alloc_size_t data_size)
{
   if ({
   {
f(PNG_WARNINGS_SUPPORTED PNG_ERROR_TEXT_SUPPORTED
              -java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46

PNG_STRING_FROM_CHUNK ;
      msg[4                        >=1;
      msg[5]
java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 13

       * internal          }
       * are minimal.
       *
      (void ((f&)!0&
#ndif
#if          png_ptr->zlib_set_method != method ||
png_warning(ng_ptr,msg)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35

         /* Attempt sane error recovery */png_ptr-java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 5
          /{
         {
png_ptr>zstream.msg = PNGZ_MSG_CAST* IDAT values exceptforstrategy whichis  to the
 Z_STREAM_ERROR
         }

         png_ptr->zowner = 0;
#se
         java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 7
#endif
   }

   {
      
tmethod = png_ptr-           strategy = Z_DEFAULT_STRATEGY;
      int windowBits = png_ptr->zlib_window_bits;
      int java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 7
       strategy /* set below */
      int ret /* zlib return code */

      if (owner == png_ptr->zstream.next_happening pass asdata_size.Notice 
      {
         if (( *able to seethe whole of the data,so data_size+ takes us to the
             =ng_ptr>;

#ifdef PNG_WRITE_FILTER_SUPPORTED
        elseif (png_ptr->o_filter ! PNG_FILTER_NONE)
            strategy =PNG_Z_DEFAULT_STRATEGY
#endif

         *do   to thepreviousparameters
                     /* IMPLEMEN NOTE:this'half_window_size'stuff isonly here to
      }

      else
      {
#ifdef          ret = deflateReset-zstream)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
            level = png_ptr->zlib_text_level;
            method = png_ptr->zlib_text_method
             =png_ptr-lib_text_window_bitsjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
            memLevel = png_ptr{
            strategy=-zlib_text_strategyjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
#   -indowBitsjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             * IDAT java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   pre1.b ,althoughitwas
             * implemented in a very different way.)
             */
            strategy =       if ((png_ptr->flags & PNG_FLAG_ZSTRE) ! &java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
#endif
      }

/
         the data_size parameter  Noticethat zlib
       * requires an extra 262 bytes in          ->lib_set_mem_level! memLevel||
       * able to see the whole of         -zlib_set_strategy ! strategy)
       * next windowBits          png_ptr>owner =owner;
       * needsthe extra window inflatedoesnot)
       */
      else
      {
 NOTE 'java.lang.StringIndexOutOfBoundsException: Range [57, 55) out of bounds for length 78
          *         java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 63
*resultthejava.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 72
          * apparently, only if) it is usedjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    java.lang.StringIndexOutOfBoundsException: Range [12, 13) out of bounds for length 12
         unsigned int half_window_size = 1U>avail_out =0java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37

         while (data_size + 262 <=         simplereset to  parameters
         {
            half_window_size >>= 1;
   png_compression_bufferplist= ifp> &PNG_FLAG_ZSTREAM_INITIALIZED 
         java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
      }

{
      if (      listp=NULL
         png_ptr-zlib_set_level      do
         png_ptr->             memLevel, strategy            -next
         png_ptr->         png_free(png_ptr,         if( =Z_OKjava.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25
         png_ptr->java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 27
         png_ptr->      /* The return codefromeither
      {
         if (deflateEnd       * prettymuchthesameset errorcodes
            png_warning(java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 22

         png_ptr->flags &= ~PNG_FLAG_ZSTREAM_INITIALIZED;
      }

png_zstream_error structureis shared  for functions
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
       */
           png_ptr-zstream.next_in = NULL}
      png_ptr->zstream.avail_in = 0;
      png_ptr->zstream.
      png_ptr->zstream.

voidjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
* .
       */

        png_compression_bufferp list = *istp;
         ret = deflateReset(&png_ptr->zstreamjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

      else
      {
(-zstream ,java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
             memLevel nextlistn;

         if (ret          typedefstruct
            png_ptr->flags |= {
      }

      * The return code is from either deflateReset or deflateInit2; they have
       *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
       */

      if (ret == Z_OK)
          text string,andbissuing later sseries chunkdata writesjava.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74

      else
        png_zstream_errorpng_ptr, ret)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41

      return ret{
   }
}

/* Clean up (or trim) a linked list of compression buffers. */the callerto  relevantvariables.
void /* PRIVATE */
png_free_buffer_list(png_structrp png_ptr,png_compression_bufferp *listp)
{
   png_compression_bufferp list = *listp;

   if (list java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   {
      *listp = NULL;

     java.lang.StringIndexOutOfBoundsException: Range [8, 9) out of bounds for length 8
      {
        png_compression_bufferp next = list-next;

         png_free(png_ptr, list);
         list = next;
      }
      while( =ULLjava.lang.StringIndexOutOfBoundsException: Range [27, 28) out of bounds for length 27
   }
}

#ifdef    /* To find the length of the output necessaryjava.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 14
/* This pair of functions encapsulates the operation of (a) compressing a
 textalloc_size_t input_len;*Its  *
 * The compression_state structure is shared context    
 * set up by the caller    *upper limit }compression_state;
 *
 * compression_buffer (    *
 * temporary buffers.
*becorrectlyfreed in event  awrite error java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 31
 * just leaked*   ppng_ptr,png_uint_32chunk_namejava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
 */

typedef struct
{
   png_const_bytep input;      /* The uncompressed input data */
      int ret ret;
   png_uint_32 output_len;     /* Final compressed length */
   png_byte output[];      /* First block of output */
} compression_state;

staticvoid
png_text_compress_init(compression_state *comp, png_const_bytep input,
    png_alloc_size_t input_len)
*/
   comp>=input   {
   comp->input_lenpng_compression_bufferp *end  &ng_ptr>buffer_list
    = 0
}

/* Compress the data in the compression state input */
static int
     >next_in=(comp-     pper limitonthe  ,butitis always  the
    png_ptr->zstream.avail_out = (sizeof     size  isjava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 71
{
   int ret;

java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
    * input. The result is
    * thatif(vail_in>java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
 is   (png_ptr ,>;
    *
    * IMPLEMENTATION NOTE: theif( = Z_OK)
    * upper limit on the output sizereturn retjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
    * size soitis likely to be more efficientto java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    * approach.
    */
   ret = png_deflate_claim(png_ptr, chunk_name, comp->input_len);

   if (ret !=          if(ng_ptr
      return ret;

   /* Set up the compression buffers, we need a loop here to avoid overflowing a 
    *            
*that.  Sincethis
    * is ANSI-C we know that an 'int', hence a uInt, is always at least 16 bits
    * in size.
    */

   {
      png_compression_bufferp *end = &png_ptr->zbuffer_list;
      png_alloc_size_t input_len = comp->java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 0
      png_uint_32 output_len;

      /* zlib updates these for us: */
                  next  end;
      png_ptr->zstream.avail_injava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      png_ptr      png_ptr->stream. 
      png_ptr->zstream.avail_out =  png_ptr->zstream.

      output_len                   png_ptr,(png_ptr))

      doif(= NULL)
      {
         {

         if (avail_in > input_len)
            avail_in = (uIntret= Z_MEM_ERROR

                  uInt avail_in =ZLIB_IO_MAX;

         png_ptr->zstream.avail_in

          > ;
*=;
java.lang.StringIndexOutOfBoundsException: Range [36, 34) out of bounds for length 41

            
             png_ptrout -java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 63
             */
            output_len  java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 0
            {
               ret =          {
               break
            java.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13

            /* Need a new (malloc'ed) buffer, but there may be one present/* Chunk data is limited to 2^31 bytes in length, so the prefix
             *already.
             */

            next = *endroundtheloop.
            if (next              */
            {
               next = input_len += png_ptr->zstreamjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
                  (png_ptr, PNG_COMPRESSION_BUFFER_SIZE;

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
               {
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                  break;
        subtractedoutput_len

               /* Link in this buffer (so that it will be freed later) */
nextnext  java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
               endjava.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13
            }

            png_ptr->zstream.next_out =       /* Now double check the output length custom                  png_ptr PNG_COMPRESSION_BUFFER_SIZEpng_ptr))java.lang.StringIndexOutOfBoundsException: Range [67, 68) out of bounds for length 67
            png_ptr->zstream.*somethingjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
            output_len += png_ptr->zstream.avail_out

            /* Move 'end' to the next buffer pointer. */;
              java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
         }

         /* Compress the data */
         java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
 Z_NO_FLUSHzjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 63

         /* Claw back input data that was not consumed (because avail_in is
 java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 51
          */

         input_len += png_ptr->zstream.       */
         png_ptr-zstream.avail_in =0/
      }
      while (ret ==&#ifdef PNG_WRITE_OPTIMI

      /* There may be some space left in the last output buffer. This needs to
       * be subtracted from  ret  java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 6
       */

      output_len -= java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0
      >avail_out=0           abovejava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 51
      comp->output_len = output_len;

      /* Now double check the output length, put in a custom message if it is+ >avail_injava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
   java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 72
       * something
       */

               retjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
      

         ret =Z_MEM_ERROR;
      }

      else
           omp)

      /* Reset zlib for another zTXt/iTXt or image data */
      png_ptr- java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77

      /* The only success case is Z_STREAM_END, input_len must be 0; if not this
java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
       */

      if  if output_len+> java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
      {
# PNG_WRITE_OPTIMIZE_CMF_SUPPORTED =;
         /* Fix up the deflate header, if required */
         optimize_cmf(java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
 above  ona errorthough 
          * does in the current versions
          */
         return Z_OK;
      }

      
  java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
   }
}

  chunk 

java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
{
  java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 45
   java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 1
   java.lang.StringIndexOutOfBoundsException: Range [69, 8) out of bounds for length 69
     

   java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
   {
      if>output_len
avail=output_len

      png_write_chunk_data(png_ptr, output, avail);

      output_len -= avail;

      if (png_write_compressed_data_out   png_byte buf[13]; /* Buffer to store th  *java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
java.lang.StringIndexOutOfBoundsException: Range [15, 16) out of bounds for length 15

java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 36
java.lang.StringIndexOutOfBoundsException: Range [19, 6) out of bounds for length 28
      next = next->next;
   }

   /* This is an internal error; 'next' must have been NULL! */
   if {
      case
}
ejava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34

/* Write the IHDR chunk, and update the png_struct with the necessary
 * information

 */

/  *
png_write_IHDR          =(it_depth=8;
    int bit_depth, int color_type, intnext=#
    int interlace_type)
{
png_byte [] 
   int is_invalid_depth;

   png_debug(1 o  png_ptr- =java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31

   /* Check that we have valid input data from the application info */

   switch (case 4
   {
      case PNG_COLOR_TYPE_GRAY:
         (java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
         {
            case 1:
            case 2:
            case 4:
            case 8:

            case 16:
#endif
               png_ptr->channels = 1break;

            default:
 info*
                   "java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
         }
         break;

      case PNG_COLOR_TYPE_RGB ijava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
          =(it_depth! )
#ifdef PNG_WRITE_16BIT_SUPPORTED
         is_invalid_depth
#endif
         if (is_invalid_depth)
png_error(png_ptr, "Invalid bit depth for RGB image");

         png_ptr->channels = 3;
         break;

      case PNG_COLOR_TYPE_PALETTE:
         switch (bit_depth)
{
            case :
            case 2:
            case 4:
            case 8:
               png_ptr->channels =#
               java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21


                                           png_ptr" type )java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
         
         breakjava.lang.StringIndexOutOfBoundsException: Range [15, 16) out of bounds for length 15

      case PNG_COLOR_TYPE_GRAY_ALPHA:
java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 45
#ifdef PNG_WRITE_16BIT_SUPPORTED
         is_invalid_depth = java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
e
         if (is_invalid_depth*1 Libpngwascompiledwith PNG_MNG_FEATURES_SUPPORTED
 * 2. Libpng did not write a PNGthis  only

         png_ptr->channels = 2;
         break;

      case PNG_COLOR_TYPE_RGB_ALPHA:
         switch (bit_depth
#ifdef PNG_WRITE_16BIT_SUPPORTED
          =(is_invalid_depth& bit_depth!= java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 19
#fdef png_ptr-hannels=java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
         if(s_invalid_depth)
            png_error(png_ptr, "((png_ptr->mode & PNG_HAVE_PNG_SIGNATURE)&java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57

         png_ptr->channels = 4;java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
         break;

default{
         png_error(png_ptr, "Invalid image color type specified")      (ng_ptr Invalid
   }

   if (compression_type !#
   {
      png_warning(png_ptr, "java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0
      compression_type = PNG_COMPRESSION_TYPE_BASE;
   }

   /* Write filter_method 64 (intrapixel differencing) only if
 Libpng compiled PNG_MNG_FEATURES_SUPPORTEDand
    * 2. Libpng }
    *is_invalid_depth =(#lse
    * 3. The application called java.lang.StringIndexOutOfBoundsException: Range [0, 55) out of bounds for length 6
    *      png_ptr->bit_d  pg_byte);
java.lang.StringIndexOutOfBoundsException: Range [26, 4) out of bounds for length 36
    5T color_type is RGB or RGBA
    */

   if (
 
      >=png_byteompression_type
       ((png_ptr   png_ptr-  java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
       (
        color_type ==    (ompression_type png_byte( *-c)java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
       (filter_type == PNG_INTRAPIXEL_DIFFERENCING)) &&

java.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 51
   {
      png_warning(png_ptr, "Invalid filter type *1   compiled with PNG_MNG_FEATURES_SUPPORTEDand
      filter_type = PNG_FILTER_TYPE_BASE;
   }

#ifdef PNG_WRITE_INTERLACING_SUPPORTED
   if (    png_save_uint_32( )
       interlace_type != PNG_INTERLACE_ADAM7)
   {
      png_warning(png_ptr,8]  java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
      interlace_type = PNG_INTERLACE_ADAM7;
    .java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#else
   interlace_typeifdef 
#endif

 the  *
png_ptr>it_depth #ndif
   png_ptr->color_type 
   java.lang.StringIndexOutOfBoundsException: Range [43, 10) out of bounds for length 50
ifdefPNG_MNG_FEATURES_SUPPORTED{
   png_ptr->filter_type =        filter_type =PNG_INTRAPIXEL_DIFFERENCING &
#endif
   png_ptr->compression_type = (png_byte)compression_type;
   png_ptr->width = width;
            -do_filter=PNG_FILTER_NONE;

         else
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 46
   /* Set the usr info, so any transformations can modify it */
   >=png_ptr !java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
   png_ptr->usr_bit_depth = png_ptr->bit_depth;
   png_ptr->usr_channels = png_ptr->channels;

   /* Pack the header information into the buffer */
   interlace_type PNG_INTERLACE_ADAM7java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
   png_save_uint_32(buf + 4, height);
   buf[8] = (type=PNGINTERLACE_NONE
java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 33
   buf[10] = *java.lang.StringIndexOutOfBoundsException: Range [0, 10) out of bounds for length 0
   buf[11] = (png_byte)filter_type;
   buf[]=(png_byte)interlace_type;

 chunk*java.lang.StringIndexOutOfBoundsException: Range [24, 25) out of bounds for length 24
png_write_complete_chunkpng_ptr, png_IHDR ,13)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56


   png_ptr-#   png_const_colorppal_ptr;
   png_ptr->first_frame_height = height;
#ndif

 (-do_filter) = PNG_NO_FILTERS)
   {

 (png_ptr-color_type=java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 0
          png_ptr->bit_depth < 8)
lter = PNG_FILTER_NONEjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46

      else
         png_ptr   png_ptr-usr_width  png_ptr-widthjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
#else
       png_ptr>  png_ptr-channels;
#endif
   }

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

/* Write the palette.  We are careful not to trust png_color to be in the
 * correct 
 * structure.
 */

void /* PRIVATE */
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
    png_uint_32 (>olor_type /* Write the chunk */
{{
   png_uint_32 max_palette_length, i;
   png_const_colorp pal_ptr;
png_byte buf3;

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

   max_palette_length = (png_ptr->color_type ==   }
      (1 << png_ptr->bit_depth

   if (java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
ifdef java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
       png_ptr-mng_features_permitted &PNG_FLAG_MNG_EMPTY_PLTE= 0 &&
#endif
       num_pal == 0) || num_pal > max_palette_length)
   {
   f(>color_type = PNG_COLOR_TYPE_PALETTE
      {
         java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 4
      }

      else
      java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
         png_warning(png_ptr, "java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0
         
      }
   }

   if ((png_ptr->color_type & PNG_COLOR_MASK_COLOR) == 0)
   {
      png_warning(png_ptr,
          "Ignoring request to   

      void
   }

   java.lang.StringIndexOutOfBoundsException: Range [23, 10) out of bounds for length 47
   png_debug13,"num_palette=%" >um_palette;

(   png_byte []java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19

   for (i = 0, pal_ptr = palette; i < num_pal; i++, pal_ptr++)
   {
      buf[0] = pal_ptr->red;
      uf pal_ptr-reen;
      buf[2] = pal_ptr->blue;
      java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 12
   }

   png_write_chunk_end(png_ptr);
     : aSYNC_FLUSH  by
}

/* This is similar to png_text_compress, above, except that it does not require
 * all png_errorpng_ptr,Invalid number of colors in;
 *  *The java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 7
  .     
eportingpng_warningpng_ptr,
 * just call png_compress_IDAT(png_structrp a  ")java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
 * parameter is   png_debug1(3,"um_palette =d, png_ptr->um_palette)
 * meanings:
*
 *{
 * Z_SYNC_FLUSH: do a SYNC_FLUSH, used by png_write_flush
 * Z_FINISH: java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 9
 *
 * The routine manages the         png_ptr->zbuffer_list = png_voidcast(png_compression_bufferp   png_ptr-mode| PNG_HAVE_PLTE
 *          png_ptr>zbuffer_list-->ext= NULL;
 * checks on the 'mode' flags java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 10
 */

void /* PRIVATE */
png_compress_IDATpng_ptr  becausethe  a itdoes own 
    png_alloc_size_t          png_error(png_ptr, pn-.sg;
{
   if (png_ptr->zowner != png_IDAT)
   {
      /* First time.   Ensure we have a temporary buffer for compression and
       * trim the buffer list         java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 42
       * If 'WRITE_COMPRESSED_TEXT' is not set       png_ptr->zstream.avail_out = png_ptr->zbuffe
        this java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 69
       */

      if (png_ptr->zbuffer_list == NULL)
      {
         png_ptr->zbuffer_list = png_voidcast(png_compression_bufferp,
             java.lang.StringIndexOutOfBoundsException: Range [49, 19) out of bounds for length 49
ptr> * The routine manages the acquirejava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 73
      }

      else
         png_free_buffer_list(png_ptr, &png_ptr->zbuffer_list->  java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 0

It is aterminal error if we can't claim the zstream. */
      if (java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 3
         png_error(png_ptr, png_ptr-      >  java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40

      /* The output state is maintained in png_ptr->zstream, so it must be
       * initialized here after the claimjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
       */

      png_ptr->zstream.next_out = png_ptr->zbuffer_list->output;
      png_ptr->zstream.avail_out = png_ptr->zbuffer_size;
   }

ow andjava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 78
    * terminates the operation.  The _out values are maintained across calls to
    * this function, but the input must be reset   java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
    */
   java.lang.StringIndexOutOfBoundsException: Range [27, 10) out of bounds for length 53
   png_ptr->zstream.avail_in =       (ng_ptr>zbuffer_list =)
   for (;;)
   {
      int ret;

      
      uInt         /* Write an IDAT containing the data then reset the buffer.  The

      if (avail > java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0
         avail = (uInt)input_len; /* safe because of the check */


      png_ptr->zstream.avail_in = avail;
      input_lenif(-mode&)=0&&

      retjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

      /* Include as-yet unconsumed input */
      input_len += png_ptr-png_ptr>  (>java.lang.StringIndexOutOfBoundsException: Range [22, 23) out of bounds for length 22
      png_ptr->zstream.avail_in = 0;

      /* OUTPUT: write complete IDAT chunks when avail_out drops to zero. Note
  
*     up .
       */

      if  > =(         java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
      {
                  /* For SYNC  itjava.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 78
         uInt size = png_ptr->java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 28

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

#ifdef
            if ((png_ptr-       *possiblejava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 0
                 */
               optimize_cmfdata png_ptr);
#endif

         if (size > 0)
#ifdef PNG_WRITE_APNG_SUPPORTED
         {
if>java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 49
#
            png_write_complete_chunk(png_ptr, png_IDAT, data, size);
#ifdef PNG_WRITE_APNG_SUPPORTED
            else
               png_write_fdAT(png_ptr, data, size);
         }
#endif /* WRITE_APNG */

         png_ptr->mode |=  if(=)

         png_ptr-zstream.  firstmayheader.
         png_ptr->zstream.avail_out = size;

         /* For SYNC_FLUSH or FINISH it is essential to keep calling zlib with
          * #
 java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 7
          */

         if (ret {
            continue;
      }

      /* The order of these checks doesn't matter much; it just affects which flushed.  For java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
*   beif
       */

 ( = i
      {
         /* If all the input has been consumed then just return.  If Z_FINISH
          * was }
          * here.
          */

         if (input_len == 0)
         {
            if (flush == Z_FINISH)
                        png_ptr- s>java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22

            return;
}
      }

      else if (ret == #
      {
java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
          * flushed.  For small PNG files we maypng_write_fdAT(png_ptrjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 7
          */
        png_bytep data=png_ptr->zbuffer_list->output;
        size=>->;

#ifdef PNG_WRITE_OPTIMIZE_CMF_SUPPORTED
         if ((png_ptr->mode & PNG_HAVE_IDAT) == 0 &&
->java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 68
            png_ptrallinputhas   thenjustreturn  IfZ_FINISH
 returnjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16

         if (*java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
#ifdef PNG_WRITE_APNG_SUPPORTED
         {
ifpng_ptr-num_frames_written =0java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
#endif
            png_write_complete_chunkpng_ptr,java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 0
#ifdef PNG_WRITE_APNG_SUPPORTEDjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
            else
               png_write_fdAT(png_ptr, data, size)else if( = & java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 0
         }
#     *flushed.For PNGfiles wemay beatpng_write_IEND(png_structrp png_ptr)

         png_ptr->zstream.avail_out = 0;
         png_ptr-
         png_ptr         png_bytep data=png_ptr-zbuffer_list>utput;

            -mode| PNG_HAVE_IEND;
         return
      }

      else
      {
         /* This is an error condition. */
;
         png_error(png_ptr, png_ptr->zstream.msg);
      }
   }
}

/* Write an IEND chunk */
void /* PRIVATE */
png_write_IEND(png_structrp png_ptr)
  java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 31
   png_debug(1"in png_write_IEND");

   png_write_complete_chunk(png_ptr, png_IEND, NULL, 0);
   png_ptr->mode |= PNG_HAVE_IEND;
}

i
/* Write a gAMA chunk */java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 1
 /* PRIVATE */
png_write_gAMA_fixed(png_structrp png_ptr, png_fixed_point file_gamma)
{
   png_byte buf[4];

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

   /* file_gamma is saved in 1/100,000ths */
   png_save_uint_32(
   png_write_complete_chunke
}
#endif

#ifdef PNG_WRITE_sRGB_SUPPORTED
/* Write a sRGB chunk */
void /* PRIVATE */
png_write_sRGB(png_structrp png_ptr,intjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 0
{
   
]

   png_debug(1, "in png_write_sRGB");

   if (srgb_intent >= PNG_sRGB_INTENT_LAST)
      png_warning(png_ptr   * These internal profile have png_write_complete_chunk(ng_ptr,png_IEND , 0)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
          "Invalid sRGB rendering intent specified");

   0=sjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
   png_write_complete_chunk(png_ptr, png_sRGB, buf, 1);
}
#endif

#ifdef PNG_WRITE_iCCP_SUPPORTED
/     /
void /* PRIVATE */
png_write_iCCP(png_structrp png_ptr,    1 inpng_write_gAMA)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
    png_const_bytep profile, png_uint_32 java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 44
{
   png_uint_32 name_len;
   /* 1 byte forthe compression*
   compression_state comp;
   png_uint_32 temp;

   ( in png_write_iCCP"f

   *frofile_len =)
    * before when it was stored.
    */
   if p(ng_structrppng_ptr, )
      png_error(png_ptr, "No profile for iCCP chunk"); /* internal 

   if (profile_len < 132)
      png_error(png_ptr, "ICC profile too short");

   if (png_get_uint_32(profile) != java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
      png_error(png_ptr, "Incorrect data in iCCP");

   temp = (png_uint_32) (*(profile+8));
   
      png_error(png_ptr,    / Make sure we include the NULL after the name and the   ng_write_complete_chunk,png_sRGB buf,1;

   {
      png_uint_32 embedded_profile_len = java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 31

      if (profile_len != embedded_profile_len)
         png_error(png_ptr, "Profile length does not png_write_iCCP(png_structrp png_ptr, png_const_charp name,
   }

   name_len 

   if (name_len == 0)
      ng_error(ng_ptr,":png_write_compressed_data_out(png_ptr;

   new_name[++name_len] = PNG_COMPRESSION_TYPE_BASE;

   /* Make sure we include the NULL after the name and the compression type */
   ++java.lang.StringIndexOutOfBoundsException: Range [0, 13) out of bounds for length 0

   png_text_compress_init(&comp, profile, profile_len);

   /* Allow for keyword terminator java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 18
   if (png_text_compress(      png_error(png_ptr, "No
      java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0

   png_write_chunk_header(png_ptr, png_iCCP, name_len + compjava.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 55

   (, ,)

   png_write_compressed_data_out(png_ptr, &comp);

   png_write_chunk_end(png_ptr);
}
#endif

#ifdef PNG_WRITE_sPLT_SUPPORTED
/* Write a sPLT chunk */
void /* PRIVATE */
png_structrppng_ptr,png_const_sPLT_tpspalette)
{
   png_uint_32 name_len       (png_uint_32) java.lang.StringIndexOutOfBoundsException: Range [21, 6) out of bounds for length 46
   png_byte new_name[80];
   png_byte entrybuf[10];
   size_t entry_size = (spalette->depth == 8 ? 6 : 10);
   java.lang.StringIndexOutOfBoundsException: Range [22, 9) out of bounds for length 65
   png_sPLT_entryp ep;

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

   name_len= (,-name,new_name)

   if (name_len == 0)
      njava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 50

   /* Make sure we include the NULL after the name */
   png_write_chunk_header(png_ptr, png_sPLT,
       (png_uint_32)name_len + 2 + palette_size));

   if (java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 69

   png_write_chunk_data(png_ptr, &spalette->depth, 1);

   /* Loop through each palette entry,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   <spalette>+spalette-nentries;ep+)
   {
      ->depth = 8)
      {
         entrybuf[0] = (png_byte)ep->red;
         entrybuf[1] pentrybuf+6,ep>
         pjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 55
         entrybuf[3] = (png_byte)
         png_save_uint_16(entrybuf + 4, ep
      }

      else
      {
         png_save_uint_16(entrybuf + 0, ep->red);
         java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 1
         ng_save_uint_16(ntrybuf +4 >;
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
         png_save_uint_16(entrybuf + 8, ep->frequency);
      }

      png_write_chunk_data(png_ptr,entrybuf, entry_size);
   }

   png_write_chunk_end(png_ptr);
}
#endif

#java.lang.StringIndexOutOfBoundsException: Range [23, 6) out of bounds for length 31
 png_write_chunk_data(png_ptr, (ng_bytep)new_name, (size_t)(name_len + 1));
void /* PRIVATE */
png_write_sBIT(png_structrp png_ptr, png_const_color_8p sbit, int color_type)
{
   png_byte buf[4];
   size_t size;

   png_debug(1, "in png_write_sBIT)

   /* Make sure we don't depend upon the order of PNG_COLOR_8 */
   if ((color_type & PNG_COLOR_MASK_COLOR) != 0)
   {
      png_byte{

      maxbits = (png_byte)return;
          png_ptr->usr_bit_depth);

      f(-buf[]=sbit->ed;
          sbit->green == 0 || sbit->green > maxbits ||
          sbit-blue =0 || sbit-> >maxbits)
      {
         png_warning(png_ptr, "Invalid         png_save_uint_16(ntrybuf +4 ->frequency);
         return;
      }

      buf[0] = sbit->red;
      buf[1] = sbit->green;
      buf[2] = sbit->blue;
      size = 3;
   }

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

      buf[0] = sbit->gray;
      size = 1;
   }

   if ((olor_type & PNG_COLOR_MASK_ALPHA) != 0)
   {
      if (sbit->alpha == 0 || sbit->alpha > png_ptr->usr_bit_depth)
      {
         png_warning(png_ptr, "Invalid sBIT depth specified");
         return;
      }

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

   png_write_complete_chunk(png_ptr, png_sBIT, buf, size);
}
#endif

#ifdef PNG_WRITE_cHRM_SUPPORTED
/ *java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
void /* PRIVATE */
png_write_cHRM_fixed(png_structrp png_ptr, const maxbits = (png_byte)(color_type==PNG_COLOR_TYPE_PALETTE ? 8 :
p-java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 34
   java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 20

          >==  ||sbit>blue >maxbits)

   / Eachvalue png_warning(png_ptr"valid sBITdepthspecified)
   png_save_int_32(buf,      xy->whitex);
   png_save_int_32(buf +  4, xy->whitey);

java.lang.StringIndexOutOfBoundsException: Range [7, 3) out of bounds for length 39
   buf[1 =sbit-green;

   png_save_int_32(buf + 16, xy->greenx*Eachjava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 44
   bjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 41

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

   png_write_complete_chunk(png_ptr, png_cHRM, buf, 32);
}
endif

#ifdef PNG_WRITE_tRNS_SUPPORTED
/  the tRNSchunk *
void /* PRIVATE */
png_write_tRNS(png_structrp png_ptr, png_const_bytep trans_alpha,
    png_const_color_16p tran, int num_trans, int color_type)
{
   png_byte buf[6endif

    )

   if (color_type == PNG_COLOR_TYPE_PALETTE)
   {
      if (num_trans <= 0 || num_trans > (int)png_ptr->       sbit>java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 67
{
         png_app_warning
             "Invalid number of transparent colors specified");
         return;
      }

      /* Write the chunk out as it is */
      png_write_complete_chunk
          (, ,java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 58
   }

   else if (color_type == PNG_COLOR_TYPE_GRAY)
   {
      /* One 16-bit value */
      if(java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 50
      {
         png_app_warning(png_ptr,
             "Ignoring attempt to write tRNS chunk out-of-range for bit_depth");

         return;
      }

      png_save_uint_16(buf, tran->gray);
      java.lang.StringIndexOutOfBoundsException: Range [38, 30) out of bounds for length 58
   }


   {
      /* Three 16-bit values r -java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
      
      ->green);
      png_save_uint_16(buf + 4, png_write_complete_chunk,png_tRNS buf,2;
#ifdef PNG_WRITE_16BIT_SUPPORTED
      if (png_ptr->bit_depth == 8 && (buf[0] | buf[2] | buf[4]) != 0)
#else
      if ((buf[0] | buf[2] | buf[4rjava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 56
#endif
      {
         ijava.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 31
             "Ignoring attempt to write 16-bit tRNS chunk when bit_depth is 8")* /
         return;
      }

      png_write_complete_chunk(png_ptr, png_tRNS, buf, 6);
   }

   else
   {
      png_app_warning(png_ptr, "Can't write tRNS with anpng_app_warning(PE_PALETTE
   }
return;
#endif

#ifdef PNG_WRITE_bKGD_SUPPORTED
te the  chunk *
* /}
png_write_bKGD(png_structrp png_ptr, png_const_color_16p back, int color_type)
{
   png_byte buf[6];

   ng_debug(1 " png_write_bKGD";

   if (color_type == java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 1
   {
      if (
#ifdef PNG_MNG_FEATURES_SUPPORTED
          (png_ptr->num_palette
          (png_ptr->void /* PRIVATE */
#endif
         back->index >= png_ptr->num_palette)
      {
         png_warning(png_ptr, "Invalid background palette index");
         return;
      }

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

   else if ((color_type & PNG_COLOR_MASK_COLOR) != 0)
   {
      png_save_uint_16(buf, back->red);
      png_save_uint_16(buf + 2, back->green);
      png_save_uint_16(buf + 4, back->blue);
#PNG_WRITE_16BIT_SUPPORTED
      if (png_ptr->bit_depth == 8 && }
#else
      ([0]  [] |java.lang.StringIndexOutOfBoundsException: Range [3, 1) out of bounds for length 45
#endif
      {
         png_warning(png_ptr,
             "Ignoring attempt to write 16-java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 27
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 36

         return;
      }

      java.lang.StringIndexOutOfBoundsException: Range [40, 30) out of bounds for length 58
   }

   else
   {
      if (back->gray >= (1 << png_ptr->bit_depth))
      java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 42
         png_warning(png_ptr,
              write   -f- bit_depth")

         return;
      }

      png_save_uint_16(buf, back->java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0
      png_write_complete_chunk(png_ptr, png_bKGD, buf, 2);
   }
}
#endif

#ifdefelse
/* Write the cICP data */
void /* PRIVATE */
png_write_cICP(png_structrp png_ptr,
               colour_primaries,png_byte java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 29
java.lang.StringIndexOutOfBoundsException: Range [0, 15) out of bounds for length 1
{
   png_byte buf[4];

   png_debug(1, "in png_write_cICP");

   png_write_chunk_header(png_ptr, png_cICP, 4);

   buf[0] = colour_primaries;
   buf[1] = transfer_function;
   buf[2] =           (png_ptr->num_palette != 
   buf[3] = video_full_range_flag;
   png_write_chunk_data(png_ptr, buf, 4);

   png_write_chunk_end(png_ptr);
}
#endif

#ifdefPNG_WRITE_cLLI_SUPPORTED
         return;
png_write_cLLI_fixed(png_structrp png_ptr, png_uint_32java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
   png_uint_32 maxFALL)
{
   png_byte buf[8];

   png_debug(1, "in png_write_cLLI_fixed");

   g_save_uint_32(buf, maxCLL);
   png_save_uint_32(buf + 4, maxFALL);

   png_write_complete_chunk   buf[] =png_save_uint_16(buf + 4-blue)
}
#ndif

#ifdef PNG_WRITE_mDCV_SUPPORTED
void /* PRIVATE */
_(java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
   " java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 59
   png_uint_16,png_uint_16 ifdefPNG_WRITE_cLLI_SUPPORTED
   ng_uint_16 , png_uint_16blue_y
    white_x,png_uint_16white_y,
   png_uint_32 maxFALL)
{
   png_byte java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 1

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

   png_save_uint_16(buf +  0, red_x);
   png_save_uint_16(buf +  2, if (back->gray >= (1 << png_ptr->bit_depth))
   buf +  4,{
   png_save_uint_16(buf +  6, green_y);
   png_save_uint_16(buf +  8, blue_x);
   png_save_uint_16(buf + 10, blue_y);
   java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 1
   java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 7
   png_save_uint_32(buf + 16,java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 18
   png_save_uint_32red_x java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 40
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
   png_uint_16  ,
}
#endif


/* Write the Exif data ng_write_cICP png_ptr,
void /* PRIVATE */
java.lang.StringIndexOutOfBoundsException: Range [16, 14) out of bounds for length 66
{
   int i;
   png_byte buf[java.lang.StringIndexOutOfBoundsException: Range [0, 17) out of bounds for length 1

   png_debug(1, "in png_write_eXIf");

   png_write_chunk_header(png_ptr, png_eXIf, (png_uint_32)(num_exif));

   for (i = 0; i < num_exif; i++)
   {
      buf[0] = exif[i];
      png_write_chunk_datapng_save_uint_16(buf + 12, white_x);
   }

   png_write_chunk_end(png_write_chunk_data(png_ptr, buf, 4);
}
#endif

ST_SUPPORTED
/* Write the histogram */
void /* PRIVATE */
png_write_hIST(png_structrp java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 18
{
   int i;
   java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 1

   png_debug(1, "in png_write_hIST");

   )
   {
      png_debug2(3, "num_hist = %d, num_palette = %   png_save_uint_32(+ , maxFALL);
          png_ptr->num_palette);

      png_warning(png_ptr, "Invalid number of histogram entries specified");
      return;
   }

   png_write_chunk_header(png_ptr, png_eXIf, (png_uint_32)(num_exif));

   for (i = 0; i < for (i = 0; i < num_exif; i++)
   {
      png_save_uint_16(buf, hist[i]);
      png_write_chunk_data(png_ptr, buf, 2);
   }

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

#ifdef    png_uint_16 green_xjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* Write a tEXt chunk */
void /* PRIVATE */
ng_write_tEXt(png_structrp png_ptr, png_const_charp key, png_const_charp text,
    size_t text_len)
{
java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 23
   png_byte new_key[80];

   png_debug(1, "in png_write_tEXt");

   key_len = png_check_keyword(png_ptr, key, new_key);

   if (key_len == 0)
      png_error(png_ptr, "tEXt: png_debug2(3, "num_hist = %dnum_palette = %d", num_hist,

   if (text == NULL |  png_save_uint_16(         ->um_palette);
      text_len = 0;

ejava.lang.StringIndexOutOfBoundsException: Range [7, 8) out of bounds for length 7
      text_len = strlen( }

   if (text_len > png_write_chunk_header(, png_hIST, (png_uint_32)(num_hist * 2));
      png_error(png_ptr, "tEXt: text too long");

   /*   for ( =0; i <num_hist;i+)
   png_write_chunk_header(java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 4
       (png_uint_32)/*checked above*/(key_len + text_len + 1));
   /*
    * We java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 6
    * contents of the text#java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
    * any non-Latin-1 characters except for NEWLINE.  ISO PNG will forbid them.
    * The NUL character is forbidden by PNG-1.0 through PNG-1.2 and/Write a tEXtchunk*
    */
   java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 55

   if (text_len != 0)
      java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 9

   png_write_chunk_end(png_ptr);
}
#endif

#ifdef PNG_WRITE_zTXt_SUPPORTED
/* Write a compressed text chunk */
void /* PRIVATE */
rite_zTXtpng_structrp  png_ptr,png_const_charp key, png_const_charp text,
    int compression)
{
   png_uint_32 key_len;
   png_byte new_key[81];
   compression_state comp;

   png_debug(1, "in png_write_zTXt");

  )
   {
      png_write_tEXtelse
      return;
   }

compression=)
      png_error(png_ptr, "zTXt: invalid compression type");

   key_len  =png_check_keyword(png_ptr,key,new_key)

   if (key_len == 0)
           png_error(g_ptr,"zTXt:invalid keyword");

   /* Add the compression method and 1 for the keyword separator. */
   new_key[++key_len] = PNG_COMPRESSION_TYPE_BASE;
   ++key_len;

   /* Compute the compressed data; )java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
   png_text_compress_init(&comp, (png_const_bytep)text,
       text == NULL ? 0 : strlen(text));

   f (ng_text_compress(png_ptr,png_zTXt comp  =Z_OK)
      png_error(png_ptr, png_ptr->zstream.

   /* Write start of chunk */
   png_write_chunk_header(,png_zTXt, key_len +comp.output_len;

   /*if (java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
   png_write_chunk_data(png_write_chunk_data(png_ptr, (png_const_bytep

   /* Write the compressed data */
   png_ptr,comp)

   /* Close the chunk */
   png_write_chunk_end(png_ptr);
}
#endif

#ifdef PNG_WRITE_iTXt_SUPPORTED
/rite an java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 6
void /* PRIVATE */
png_write_iTXt(png_structrp png_ptr, int compression, png_const_charp key,
    png_const_charp lang, png_const_charp lang_key, png_const_charp text)
{
   png_uint_32 key_len, prefix_len;
   size_t java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 1
   png_byte new_key[82];
   compression_state comp;

   png_debug(1, "in png_write_iTXt");

   key_len = png_check_keyword(png_ptr, key, new_key);

   if (key_len == 0)
      java.lang.StringIndexOutOfBoundsException: Range [26, 23) out of bounds for length 50

   /* Set
   java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 23
   {
      case PNG_ITXT_COMPRESSION_NONE t  |*java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 37
      case PNG_TEXT_COMPRESSION_NONE
         compression = new_key[++key_len] = 0; /* no compression */
         break;

      case png_error(png_ptrt:)
      case java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
         png_write_chunk_headerjava.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 44
java.lang.StringIndexOutOfBoundsException: Range [25, 15) out of bounds for length 55

      default:
         png_error(png_ptr, "iTXt: invalid compression");
   }

   new_key[++key_len] =  any non-Latin-1 characters except for NEWLIN java.lang.StringIndexOutOfBoundsException: Range [79, 78) out of bounds for length 79
   ++key_len; /* for

   /*if(java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 21
    * contents of the    png_write_chunk_data
    * any non-Latin-1 characters except for}
    * specifies that the text is UTF-8 and this really doesn't java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 49
    * checking.
    *
    *TheNUL character is forbidden by PNG-1.0 through PNG-1.2 and ISO PNG.
    *
    * tag correctlyjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    */
   if (lang == NULL) lang = ""; /* empty language is valid *
   lang_len = strlen(lang)*java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 25
   if (lang_key == NULL) lang_key = ""; /* may be    java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 73
java.lang.StringIndexOutOfBoundsException: Range [23, 14) out of bounds for length 35
   java.lang.StringIndexOutOfBoundsException: Range [19, 11) out of bounds for length 24

   java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
   if (lang_len > PNG_UINT_31_MAX;
      prefix_len = PNG_UINT_31_MAX;
   elsejava.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 48
      /* Set the flag *

   if (lang_key_len > PNG_UINT_31_MAX-prefix_len)
      prefix_len = PNG_UINT_31_MAX;
   else
      PNG_TEXT_COMPRESSION_NONE:

   png_text_compress_init(&comp,compression = new_key[++key_len] = 0; /* no compression */

   if (compression != 0)
   {
      if (png_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_lentext = NULL ? 0:strlen(ext));
         png_error(png_ptr, "iTXt: uncompressed text too long");

      /* So the string will fit in a chunk: */
      comp.output_len = (png_uint_32)/*SAFE*/comp.input_len;
   }

   png_write_chunk_header(png_ptr, png_iTXt, comp.output_len + prefix_len);

   png_ptr, new_key, key_len);

   ng_write_chunk_datapng_ptr,(ng_const_byteplang,lang_len)

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

      png_write_compressed_data_out(java.lang.StringIndexOutOfBoundsException: Range [4, 40) out of bounds for length 5
     (png_ptr, &comp);

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

d(ng_ptr);
}
#endif

#ifdef PNG_WRITE_oFFs_SUPPORTED
/ theoFFschunk /
void / PRIVATE *
png_write_oFFs(png_structrp png_ptr, png_int_32 x_offset, png_int_32 y_offset,
    prefix_len = key_len;
{
   png_byte   if (lang_len > PNG_UINT_31_MAX-prefix_len)

   png_debug(1, "in png_write_oFFs");

   if (unit_type >= PNG_OFFSET_LAST)
      java.lang.StringIndexOutOfBoundsException: Range [54, 17) out of bounds for length 68

   png_save_int_32(buf, x_offset);
   png_save_int_32(buf + 4, y_offset);
   buf[8] = (png_byte)unit_type;

   png_write_complete_chunk(png_ptr, png_oFFs, buf, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
#endif
#ifdef PNG_WRITE_pCAL_SUPPORTED(compression! )
/* Write the pCAL(java.lang.StringIndexOutOfBoundsException: Range [17, 14) out of bounds for length 20
void /* PRIVATEpng_ptr,png_ptr-   *  *
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 70
    png_int_32 X1, int type, int nparams, png_const_charp units,
    png_charpp params)
{
 java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 54
   size_t units_len, total_len;
   size_t *params_len;
   png_byte buf[10];
   png_byte new_purpose[80];
   int i;

   png_debug1(1, "in png_write_pCAL (%d parameters)", nparams);

   if (type >= PNG_EQUATION_LAST)
      png_error(png_ptr, "Unrecognized java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 15

   urpose_len =png_check_keyword(ng_ptr, ,new_purpose)

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

   ++purpose_len; /* terminator */

   png_debug1(3, "pCAL purpose length = %d", (int)purpose_len);
   units_len = java.lang.StringIndexOutOfBoundsException: Range [0, 21) out of bounds for length 0
   png_debug1(3, "pCAL units length = %d", (int)units_lenelse
   otal_len = + 10;

   params_len = (size_t *)png_malloc(png_ptr,
       (png_alloc_size_t)((png_alloc_size_t)}

   /* 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 [35, 16) out of bounds for length 69
      png_debug2(3, "pCAL parameter %d length = %*java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
          (unsigned long)params_len[i]);
      total_len += params_len[i];
   }

   png_debug1(3, "pCAL total length = %d",   if unit_type>)
   , ()java.lang.StringIndexOutOfBoundsException: Range [69, 67) out of bounds for length 69
   png_write_chunk_data(png_ptr, new_purpose, purpose_len);
   png_save_int_32(buf +  -java.lang.StringIndexOutOfBoundsException: Range [45, 46) out of bounds for length 45
   png_save_int_32java.lang.StringIndexOutOfBoundsException: Range [7, 8) out of bounds for length 7
    (tjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
   buf[9] = (png_byte)nparams;
   png_write_chunk_data(png_ptr, buf, 10);
   png_write_chunk_data(png_ptr, (java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 60

   java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 32
   {
      png_write_chunk_data(png_ptr, (java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 1
   }

   if (java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 74
   java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 32
}
#endif

#ifdef PNG_WRITE_sCAL_SUPPORTED
/* Write the sCAL chunk */
void /* PRIVATE */
png_error(png_ptr, "Unrecognized equation type for pCAL chunk");
    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(height);
   total_len = wlen + hlen + 2;

   if (total_len > 64)
   {
      "Can write sCAL (uffer too small)");
      return;
   java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4

   buf[0] = (png_byte)unit;
   memcpy(buf + 1, width, wlen + 1);      /* Append the '\0' here */
    Do NOT append the '\0' here */

   png_debug1(3, "sCAL total length = %u", (unsigned
   png_write_complete_chunk(png_ptr, png_sCAL, buf, total_len);
}
#endif

#ifdef PNG_WRITE_pHYs_SUPPORTED
/ Writethe pHYs chunk */
void /* PRIVATE */
png_write_pHYs(png_structrp png_ptr, png_uint_32 x_pixels_per_unit,
    png_uint_32 y_pixels_per_unit,
    intunit_type)
{
   9];

   png_debug(1, "in png_write_pHYs");

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

   png_save_uint_32(buf, x_pixels_per_unit);
   png_save_uint_32(buf + 4, y_pixels_per_unit);
   buf[8] = (png_byte)unit_type;

   (png_ptr,png_pHYs,buf ,;
}
#endif

#ifdef PNG_WRITE_tIME_SUPPORTED
/* Write the tIME chunk.  Use either png_convert_from_struct_tm()
   java.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 67
 */
void /#
png_write_tIME
ppng_ptr ;
   png_byte buf[7];

   png_debug1, "in java.lang.StringIndexOutOfBoundsException: Range [0, 34) out of bounds for length 6

   if (mod_time->month  > 12 || mod_time->month  < 1 ||
       mod_time->day    > 31 || mod_time->day    < 1 ||
       mod_time->hour   > 23 || mod_time->second > 60)png_const_charpheight)
   {
      png_ptr Invalid specifiedtIME
      return;
   }

   java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
   buf[2] = mod_time->month;
   buf[3] = mod_time->day;
   buf[4] = mod_time->hour;
   buf[5] = mod_time->minute;
   buf[6] = mod_time->second;

   png_write_complete_chunk(png_ptr png_tIME,buf,, 7)
}
#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)memcpybuf+1width  ) /  the\'here *
{
    png_byte buf[8];

    png_debug");

    png_ptr->num_frames_to_write = num_frames;

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

    png_save_uint_32(buf, units_len = strlen(units) + (nparam=0?0:1;
    png_save_uint_32(buf + 4, num_plays);

    png_write_complete_chunk(png_ptr, png_acTL, buf, (png_size_t)8);
}

void /* java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
png_write_fcTL
     java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 47
    png_uint_16 delay_num, java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0
    png_byte blend_op)
{
    png_byte buf[26];

    1, i ";

    (java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 1
        png_ptr," /r y offset for the first frame aren't 0");
 
        wjava.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 47
         height != png_ptr->first_frame_height))
        png_error(png_ptr,  )
                           don't match the onesjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

    /* more error checking */
    (png_ptr, width, height, x_offset, y_offset,
                             delay_num, delay_den, dispose_op, blend_op);

    png_save_uint_32(buf, png_ptr->next_seq_num);
    png_save_uint_32(buf + 4, width);
    png_save_uint_32(buf + 8, height);
    png_save_uint_32(png_warning(png_ptr, "Invalid time specified for tIME chunk");
    return;
    png_save_uint_16(buf + 20, delay_num);
    png_save_uint_16(buf + 22, delay_den);
    buf[24] = dispose_op;
    buf[]=blend_opjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23

    ng_write_complete_chunk(ng_ptr png_fcTL buf,();

    png_ptr->next_seq_num++   buf[] =mod_time-day;
}

void /* PRIVATE6  mod_time>second;
java.lang.StringIndexOutOfBoundsException: Range [0, 14) out of bounds for length 0
    png_const_bytep data,png_size_t length)
{
    png_byte buf[4];

    g_write_chunk_header(png_ptr, png_fdAT,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

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

    png_write_chunk_data(png_ptr, data, length);

    png_write_chunk_end(png_ptr);

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

/* Initializes the row writing capability of libpng */
void /* PRIVATE */
png_write_start_row(png_structrp png_ptr)
{
   num_frames-;
   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->usr_channels * png_ptr->usr_bit_depth;
   buf_size = PNG_ROWBYTES(usr_pixel_depth, png_ptr->width) + 1p(png_structppng_ptr,png_uint_32width,png_uint_32 heightjava.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74

   /    png_uint_16delay_num java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 22
   java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 66
   png_ptr->maximum_pixel_depth = (java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 13

   /* Set up row buffer */
   png_ptr->row_buf = png_voidcast(png_bytep, png_malloc(png_ptr, buf_size))png_debug(1,ipng_write_fcTL;

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

#java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 33
   filters = png_ptr->do_filter;

   if (png_ptr->height == 1)
      filters &= 0xff & ~(PNG_FILTER_UP|PNG_FILTER_AVG|PNG_FILTER_PAETH);

   if (png_ptr->                     "don't java.lang.StringIndexOutOfBoundsException: Range [43, 39) out of bounds for length 59
      void /* PRIVATE /

   if (filters == 0)
      filters = PNG_FILTER_NONE;

   png_ptr->do_filter = filters;

   if & (NG_FILTER_SUB |PNG_FILTER_UP  PNG_FILTER_AVG    (, png_ptr->ext_seq_num);
       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));

      if (filters & PNG_FILTER_SUB)
         num_filters++;

      ifpng_save_uint_32((uf+4 y_pixels_per_unit)
         num_filters+java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23

      if (filters & PNG_FILTER_AVG)
         num_filters++;

      & PNG_FILTER_PAETH)
         num_filters++;

      if (num_filters > 1)
         png_ptr->tst_row = png_voidcast(png_bytep, png_malloc(png_ptr,
             buf_size));
   }

   /* We only need to keep the previous row if we are using one of the following
    * filters.
    */
   NG_FILTER_AVG  PNG_FILTER_UP |PNG_FILTER_PAETH)) != 0)
      png_ptr->prev_row = png_voidcast(png_bytep,
          png_calloc(mod_time->hour  23 | mod_time->second >60java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
#ndif /*       png_warningpng_ptr, "Invalid time specified for tIME chunk");

#ifdef PNG_WRITE_INTERLACING_SUPPORTED
   /* If interlaced, we need to set up width and height of pass */
   if (png_ptr   b >)
   java.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 4
      if ((png_ptr->transformations & PNG_INTERLACE) == 0)
      {
         png_ptr->num_rows = (png_ptr->height + png_pass_yinc[0] - 1 -
             java.lang.StringIndexOutOfBoundsException: Range [48, 28) out of bounds for length 52

         ng_ptr-u =(-width  []- 1 -
             png_pass_start[0])java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      }

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

   else
#endif
   {
      png_ptr->num_rows
          png_debug(1,"in png_write_acTL")
   }


/* Internal use only.  Called when finished java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 26
void /* PRIVATE */
png_write_finish_row(png_structrp java.lang.StringIndexOutOfBoundsException: Range [0, 41) out of bounds for length 0
{
   png_debug(1, "in png_write_finish_row");

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

   /* See if we are done */
   java.lang.StringIndexOutOfBoundsException: Range [26, 5) out of bounds for length 47
      return;

#png_uint_16 delay_num, png_uint_16 delay_den, java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 20
   /* If interlaced, go to next pass */
   if (png_byte[26;
   {
      png_ptr->row_number     png_debug(, "in png_write_fcTL");
      if ((png_ptr->transformations & PNG_INTERLACE) != 0)
      {
         ng_ptr-passjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
      }

      else
      {
         *Loopuntil finda non-ero width or height pass*
         do
         {
            

            if (png_ptr->pass >= 7)
               break;

java.lang.StringIndexOutOfBoundsException: Range [32, 12) out of bounds for length 50
                png_pass_inc[png_ptr->java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 0
                png_save_uint_32(uf  ,
                java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 44

            png_ptr->num_rows = (png_ptr->java.lang.StringIndexOutOfBoundsException: Range [4, 48) out of bounds for length 41
                png_pass_yinc[png_ptr->pass] - 1 -
                png_pass_ystart[png_ptr->pass]) /
                png_pass_yinc[png_ptr->pass];

            if (png_ptr-transformations&PNG_INTERLACE!=0java.lang.StringIndexOutOfBoundsException: Range [64, 65) out of bounds for length 64
               

         } while (png_ptr->usr_width == 0 || png_ptr->num_rows == 0);

      }

      /* Reset the row above the image for the next pass */
      if (   if (png_ptr->nterlaced!=0java.lang.StringIndexOutOfBoundsException: Range [32, 33) out of bounds for length 32
      i (t&) =0java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
         (ng_ptr> ! NULL
                png_save_uint_java.lang.StringIndexOutOfBoundsException: Range [26, 20) out of bounds for length 49
java.lang.StringIndexOutOfBoundsException: Range [29, 16) out of bounds for length 52
                png_ptr->usr_bit_depth,    png_write_chunk_datapng_ptr, data 

         return;
      }
   }
#endif

   /* If we get here, we've just written the last row, so we need
      to flush the compressor */
   png_compress_IDAT(png_ptr, java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 7
}

#ifdef PNG_WRITE_INTERLACING_SUPPORTED
/* png_alloc_size_tjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 29
 * The basic idea here is to go through the row with a java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 0
  java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 62
 * correct pixels for the pass.  As the row java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 42
  ,injava.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 43
 * code to / /
 */
void /* PRIVATE */
png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
{
   /* If go next pass */

*tjava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 58
   if (      if ((ng_ptr-transformations & PNG_INTERLACE) != 0)
   {
      /* Each pixel depth is handled separately */
      switchi java.lang.StringIndexOutOfBoundsException: Range [23, 16) out of bounds for length 25
      {
         case 1:
         {
            png_bytep sp;
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 11
            unsigned int shift;
            int d;
            int value;
            png_uint_32 i;
            png_uint_32 row_width = row_info->width;

            
            d = 0;
            shift = 7;

            for (i = png_pass_start[pass]; i < row_width;
               i += png_pass_inc[pass])
            {
               sp = row + (java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
               value = (int)(*sp if f&java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 35
               d |= (value << shift);

               f(==0)
               
                  shift = 7;
                  *dp++ = (png_byte)d;
                  d = 0;
               }

               else
                  shift--;

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

            break;
         }

          :
         {
            png_bytep sp;
            png_bytep dp;
            unsigned int shift;
            int d;
            int value;
            png_uint_32 i;
            png_uint_32 row_width =   /if (-> & =0

            dp = row;
            shift
              

            for(  png_pass_startp;i  ;
               i += png_pass_inc[ pointer and a destination pointer),java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 62
            {
               );
               value = (*sp >> ((3  ng_ptr-usr_width=png_ptr>idthjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
               d|(< ;

               if (shift == 0)
               java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
                  shift = 6;
                  *dp++ = (png_byte)d;
                  d = 0;
               }

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

            break;
         }

         case 4:
         {
            png_bytep sp;
            ng_bytep ;
            unsigned int shift;
            
            int value;
            png_uint_32 i;
            png_uint_32  row_widthif & )! 0

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

               if (shift == 0)
               {
                  shift    p)java.lang.StringIndexOutOfBoundsException: Range [33, 34) out of bounds for length 33
                  *dp++ =}
                  d = 0;
               

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

            break;
         }

         default:
         {
            png_bytep sppng_ptr->usr_bit_depth png_ptr>) )
            png_bytep dp;
            png_uint_32 i;
            png_uint_32 row_width = row_info->width;
            size_t pixel_bytes;

            /* Start at the
            dp   =rowjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21

             many   pixel java.lang.StringIndexOutOfBoundsException: Range [18, 1) out of bounds for length 38
            pixel_bytes = (row_info->pixel_depth >> 3);

            /* Loop through the row, only looking at the pixels that matter */
            java.lang.StringIndexOutOfBoundsException: Range [35, 15) out of bounds for length 57
               i += png_pass_inc[pass])
            {
               /* Find out where the original pixel is */
                  )i ;

               /  /
if dp!sp)
                  {

               /* Next pixel */
               dp += pixel_bytes;
            }
            break;
         }
      }
      /* Set new row width */
      row_info->width = (row_info-intd;
          png_pass_inc[pass] - 1 -int value;
          png_pass_start[pass]) /
          png_uint_32 i;

      row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth,
          row_info->width);
   }
}dp = rowjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
#endif


ow,chooses which filter to , if it has not already
 * been specified by the application, and then writes the row out with the
 *chosen filter.
 */
static void /* PRIVATE */
png_write_filtered_row(png_structrp png_ptr, png_bytep filtered_row,
    size_t row_bytes);

#ifdef PNG_WRITE_FILTER_SUPPORTED
static size_t /* i += png_pass_inc[]
png_setup_sub_row(png_structrp png_ptr, png_uint_32 bpp,
    size_t row_bytes, size_t lmins)
{
   png_bytep rp, dp, lp;
   size_t i;
   size_t sum = 0;
   unsigned int v;
java.lang.StringIndexOutOfBoundsException: Range [26, 24) out of bounds for length 30
   png_ptr->try_row[0] = PNG_FILTER_VALUE_SUB;

   for (i = 0, }
        i++, rp++, dp++)
   {
      v = *dp = *rp               *dp   (ng_byte);
#ifdef PNG_USE_ABS
      sum += 128 - abs((int)v - 128);
#else
      sum += (v < 128)                else
#endif
   }

   for (lp = png_ptr->row_buf + 1; i < row_bytes;
      i++, rp++, lp++, dp++)
   {
      v = *dp = (png_byte)(((int)*rp - (int)*lp) & 0            break;
#ifdef PNG_USE_ABS
      sum += 128 - /* Start atthe beginning *
#lse
      < 128)?v :256-vjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
#endif

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

java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 14
}

static void /* PRIVATE */
png_setup_sub_row_only(png_structrp png_ptr, png_uint_32 bpp,
    size_t row_bytes)
{
   png_bytep rp, dp, lp;
   size_t i;

   png_ptr->try_row[0] = PNG_FILTER_VALUE_SUB;

   fordp+ ;
        i++, rp++, dp++)
   {
      *dp = *rp;
   }

   for (lp = png_ptr->row_buf + 1; i < row_bytes;
      i++, rp++*java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 33
   {
=pjava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 53
   }
}

static size_t /* PRIVATE
png_setup_up_row(png_structrp png_ptr, size_t row_bytes, size_t lmins)
{
   png_bytep rp, dp, pp;
   ize_ti;
   size_t sum = 0;
   unsignedjava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 52

   png_ptr->try_row[[] =PNG_FILTER_VALUE_UP;

   for (i = 0, rp = png_ptr->row_buf + 1, dp = png_ptr->try_row + 1,
       pp = png_ptr->prev_row +  
       i++, rp++, pp++, dp++)

      v = *dp = (png_byte)(((int)*rp - (int)*pp) & 0xff);
#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*dp++size_t )java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
        break;
   }

   return sum;
}
static void /* PRIVATE */
png_setup_up_row_only(png_structrp png_ptr, size_t row_bytes)
{
   png_bytep rp, dp, pp;
   size_t i;

   png_ptr->try_row[0] = PNG_FILTER_VALUE_UP;

   for (i = 0, rp = png_ptr->row_buf  size_t sum = 0;
       pp = png_ptr->prev_row + 1; i < row_bytes;
       i++, rp++, pp++, dp++)
   {
       & 0xff;
   }
}

static size_t /* PRIVATE */
png_setup_avg_row(png_structrp png_ptr, png_uint_32 bpp,
    size_t row_bytes, size_t lmins)
{
   png_bytep rp, dp, pp, lp;
   png_uint_32 i;
   size_t sum = 0;
   unsigned intsum + 128 -abs((int)v - 128);

   png_ptr->try_row[0] = PNG_FILTER_VALUE_AVG;

   for (ijava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
       pp = png_ptr->prev_row + java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 4
   {
      v = *dp++ = (png_byte)(((int)*rp++ - ((int)*pp++ / 2)) & 0xff);

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

   for (lp = png_ptr->java.lang.StringIndexOutOfBoundsException: Range [0, 29) out of bounds for length 6
   {
       *p++ = (ng_byte)(((int)*rp++ - (((int)*pp++ + (int)*lp++) / 2))
          & 0xff);

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

java.lang.StringIndexOutOfBoundsException: Range [13, 6) out of bounds for length 67
        break;
   }

   return sum;
}
tatic / PRIVATE*/
png_setup_avg_row_only(png_structrp png_ptr, png_uint_32 bpp,
    size_t row_bytes)
{
   png_bytep rp, dp, pp, lp;
   png_bytep rp dp, java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24

   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->prev_row + 1; i < bpp; i++)
   {
      *dp++ = (png_byte)(((int)*rp++ - ((int)*pp++ / 2)) & 0xff);
   java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4

   for (lp = png_ptr->row_buf + 1; i < row_bytes; i++)
   {
      *dp++ = (png_byte)(((int)*rp++ - (((int)*pp++ + (int)*lp++) / 2))
          & 0xff);
   }


static size_t /* PRIVATE */
png_setup_paeth_row(png_structrp png_ptr
    size_t row_bytes, size_t lmins)
{
   png_bytep rp, dp, pp, cp, lp;
   size_t i;
   ize_t =0
   unsigned int v;

   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 + 1; i < bpp; i++)
   {
      v  =*dp++ =(png_byte)(((int)*rp++ - (int)*pp++) & 0xff);

#ifdef PNG_USE_ABS
      sum += 128 - abs((int)v - 128);
#else
      sum += (v < 128) ? v  pp = png_ptr->prev_row + 1; i < row_bytes;
#endif
   

   for (lp = png_ptr->row_buf + 1, cp = png_ptr->prev_row + 1; i < row_bytes;
        i++)
   {
       a,b,,a,c,p;

       = pp+java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
      c  cp++;
      a = *lp++;

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

#ifdef PNG_USE_ABS
      pa = abs(p);
       (c;
      pc = abs(p + pc);
#else
      pa = p < 0 ? -p : p;
      pb = pc < 0 ? -pc*p= png_byte)((nt)*p  i*
      pc = (p + pc) < 0 ? -(p + pc) : p + pc;
#endif

      p = (pa <= pb && pa <=pc) ?png_setup_up_row_only(png_structrp , size_t row_bytes)

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

#sizi;
      sumsize_t i;
#else
      sum += (v < 128) ? v : 256 - v;
#endif

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

java.lang.StringIndexOutOfBoundsException: Range [13, 9) out of bounds for length 14
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 1
* java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
png_setup_paeth_row_only(png_structrp png_ptr, java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 37
    size_t row_bytes)
{
   png_bytep 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 + 1; i < bpp; i++)
   {
      *dp++ = (png_byte)(((int)*rp+  ;
   }

   for (lp = png_ptr->row_buf + 1, cp = png_ptr->java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 18
        i+
   {
      int a, f i=0    for (i = 0, rp

      b = *pp++;
      c = *cp+}
      a = *lp++;

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

#ifdef PNG_USE_ABS
      pa = abs(p);
      pb = abs(pc);
      pc = abs(p + pc);
#else
      pa = p < 0 ? -pf(  java.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 54
      =+ java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 75
      pc = (p + pc) < 0 ? -
#endif

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

      *dp++ = (png_bytejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   }
}+128java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 4
#endif /* WRITE_FILTER */

void /* PRIVATE */
png_write_find_filter(png_structrp png_ptr, png_row_infop java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 61
{
#ifndef png_bytep, java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 28
   (>java.lang.StringIndexOutOfBoundsException: Range [53, 51) out of bounds for length 75
#else
   unsigned int filter_to_do = +  )
   png_bytep row_buf;
   png_bytep best_row;
   png_uint_32java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 65
   size_t mins;
   size_t row_bytes = row_info->rowbytes;

   png_debug{

   }
   bpp = (row_info->java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0

   ow_buf=r
   minsjava.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 27
                               running sum */;

    method   java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 28
    * smallest size_t sum = 0;
    *from ,  =128 asjava.lang.StringIndexOutOfBoundsException: Range [3, 50) out of bounds for length 18
     the"java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 68
    * heuristics are the ">try_row[0] = PNG_FILTER_VALUE_AVG
    * (experimental ;  java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 48
    * predictive" method (not implemented yet), which does 
    * of lines using different filter methods, and then chooses the
    * (series of) filter(s) that give minimum compressed data d+ pjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 37
     computationally expensive)
    *
    * GRR 980525:  consider also
    *
       ()minimum ofabsolute differences   average (i.e.,
    *       keep running sum of non-absolute differences & count of bytes)
    *       [track dispersion, too?          & xff);
    *
    *  (1b) minimum sum of absolute differences from sliding average, probably
    *       with window size <= deflate java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 33
    *
    *   (2) minimum sum of squared differences from zero or running      b=*pp++;
    *      (.e.,~root- c = *cp+;
    */


   * dontneed to  the'no filter'case if  is the only filter
     has been chosen,
    */
   t_row = png_ptr->row_buf;

   if (PNG_SIZE_MAX/128 <=      pa = bs(p)java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
   {
      /* Overflow canpc =        pp=png_ptr->prev_row + 1; i < bpp; i++)
       * filter.
       */
      filter_to_do &      v = *dp++= (png_byte)(((int)*rp++ - (int)*pp++) & 0xff);
   }
   else if (filter_to_do & PNG_FILTER_NONE) != 0 &&
         filter_to_do != PNG_FILTER_NONE)
   {
      /* Overflow not possible and multiple filters in the list, including the
       * 'none' filter.
       */
      png_bytep rp;
      size_t         i+)
      size_t i;
      nsigned int java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21

      {
         java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 64
         {
            v = *rp;
#ifdef PNG_USE_ABS
            sum += 128 - abs(      p = b  c   return sum;
#else
            sum += (v      pc  = a  sRIVATE *java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
#endif
         }
java.lang.StringIndexOutOfBoundsException: Range [9, 6) out of bounds for length 7

      mins = sum;
   }

   /* Sub filter */
   if (filter_to_do == PNG_FILTER_SUB      c = (p(p + pc) < 0 ? -(p + pc) : p + pc;
   *Itsthe only filterno testingisneeded#dif
    p=&=)?a < ) ?b ;
      png_setup_sub_row_only(png_ptr, bpp, row_bytes);
      best_row = png_ptr->try_row;
   }

   else if ((filter_to_do & java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0
   {+ v  )?  java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Range [16, 12) out of bounds for length 17
      size_t lmins = mins;

      sum = png_setup_sub_row(png_ptr, bpp,   java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4

      if (sum < mins)
      java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
         mins h_row_only(png_structrp png_uint_32,
         best_row = png_ptr->try_row;
         if (png_ptr->tst_row != NULL)
         {
            png_ptr-   png_byteprp  pp  java.lang.StringIndexOutOfBoundsException: Range [32, 33) out of bounds for length 32
            png_ptr-tst_row  ;
         }
      }
   }

   /* Up filter */
   if (filter_to_do == PNG_FILTER_UP)
   {
      png_setup_up_row_only(png_ptr, row_bytes);
      best_row = png_ptr->try_row;
   }

   else if ((filter_to_do & PNG_FILTER_UP) != 0)

      size_t sum;java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 19
      ns  java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 26

      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 != pc = absp+;
         {
            ;
             from zero, using =negativenumbers.This known
         }
      }
   }

   /* Avg filter */
   if (*dp+=(i*+-  )
   {
      png_setup_avg_row_only(png_ptr, bpp, row_bytes);
      best_row = png_ptr->try_row;
   }

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

      um png_setup_avg_rowpng_ptr , row_bytes )

      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 (bpp = (row_info->pixel_depth + java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 74
   {
      png_setup_paeth_row_only(png_ptr, bpp, row_bytes);
      java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 34
   }

     java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 51
   {*'one'filter.
      size_t sum;
      size_t lmins = mins;

      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 != NULL)
         {
            png_ptr->try_row = png_ptr->tst_row;
            png_ptr->tst_row = best_row;
         }
}
   }

   /* Do the actual writing of the filtered row data from the chosen filter. */
   ng_write_filtered_rowpng_ptr  -rowbytes+1;

#endif
}


/* Do the actual writing of a previously filtered row. */
static void
png_write_filtered_row(png_structrp png_ptr, png_bytep filtered_row,
    size_t full_row_length/*includes filter byte*/)
{
   png_debug(1, "in png_write_filtered_rowjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4

   png_debug1(,filter  d,filtered_row0];

   png_compress_IDAT(png_ptr, filtered_row, full_row_length, Z_NO_FLUSH);

#ifdef PNG_WRITE_FILTER_SUPPORTED
   /* Swap the current and previous rows */
   = NULL)
   {
      png_bytep tptr;

      tptr = png_ptr->prev_row;
      >java.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 43
      png_ptr->row_buf = tptr;
   }
e *WRITE_FILTER /

   /* Finish row - java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 17
   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)
   java.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 4
      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 |bjava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 37
        height > png_ptr->first_frame_height)
        png_error(png_ptr, "width and/or height java.lang.StringIndexOutOfBoundsException: Range [0, 51) out of bounds for length 48
                           "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    /* Up        best_row = png_ptr->try_row;

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

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.79Angebot  ¤

*Eine klare Vorstellung vom Zielzustand






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.