title: How to uncompress png file
body: <p>I get image png, this image has been compressed using the following method:</p>
  
  <p>the first two pixels and all the odd pixels are false pixels:</p>
  
  <ul>
  <li>the first pixel is actually an integer that represents the total number of pixel colors that must be repeated to build the decompressed image;</li>
  <li>the second pixel is an integer which determines the height of the image once decompressed (its width is the same as that of the compressed image);</li>
  <li>the third pixel and all subsequent odd pixels (pixels [2n +1] with n> = 1), are integers representing the number of repetitions to be performed on the following pixels (pixels [2n +2] with n> = 1 ).</li>
  </ul>
  
  <p>I'm trying to get information about a PNG file.</p>
  
  <pre><code>BufferedImage img= ImageIO.read(new File("D://rle.png"));
          Raster raster=img.getData();
          int w=raster.getWidth();
          int h=raster.getHeight();
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/r0XDD.png" alt="enter image description here"></p>
  
  <p>I'm looking for the fastest way to get pixel data and way to uncompress this image with this method.</p>