title: Libgdx use transition sprites
body: <p>i found some transition sprite and want to use them in my programm. It's just a black and white picture.</p>
  
  <p>How can I get every pixel under a brightness value from this sprite and draw these pixel black, to get an animation?</p>
  
  <p>I tried something like this:</p>
  
  <pre><code>sr.begin(ShapeType.Filled);
      sr.setColor(0, 0, 0, 1f);
      for(int y = 0; y &lt; 320; y ++) {
          for(int x = 0; x &lt; 531; x ++) {
              transSprite.getTexture().getTextureData().prepare();
              int brightness = transSprite.getTexture().getTextureData().consumePixmap().getPixel(x, y);
  
              if(brightness &lt;= alpha * 255) {
                  sr.rect(x, y, 1, 1);
              }
          }
      }
      sr.end();
  </code></pre>
  
  <p>But this is too slow.</p>
  
  <p>I have a resolution of 531 x 320 Pixel and an alpha value between 0 and 1 for the animation.</p>
  
  <p>Do you have any ideas?</p>