title: LibGDX scaling 2d graphics
body: <p>I have problem with stretching sprites in LibGDX.</p>
  
  <p>I have one png file for the sky in the game (1x1000 px) and i want to do it 1000x1000px</p>
  
  <pre><code>sprite.setSize(pixelWidth,pixelHeight);
  </code></pre>
  
  <p><strong>Edit:</strong> Here is the image that I want to stretch - <a href="https://i.stack.imgur.com/whxWZ.png" rel="nofollow noreferrer">sky</a> . It has little gradient from the top to the bottom as you can see. I want to make it 1000px in width. I expect image that has color-change in the width. </p>
  
  <p>But I get this strange result:
  <img src="https://i.stack.imgur.com/pQ7Z4.png" alt="Image">
  <a href="https://i.stack.imgur.com/pQ7Z4.png" rel="nofollow noreferrer">Image</a></p>
  
  <p>You can see that there is something like gradient in width, even with lines, but with no reason, because I am scaling 1px image...</p>
  
  <p>The strange thing is that everything looks fine on other PC's and mobile phones... But I don't think that the problem is in my PC!?</p>
  
  <p>I don't know what to try...
  Any ideas?</p>
  
  <p><em>Sorry if I didn't explained it very well.. and sorry for my bad english</em></p>
  
  <p><strong>Final: It was from the filtering. I changed the filter from linear to nearest and everything was fine</strong></p>