title: Resize image without loss of information
body: <p>I was trying to do really the same functionality of resizing images like in MS Word.</p>
  
  <p>I want to resize BufferedImage but I’m losing some information during process of resizing.</p>
  
  <p>I tried to implement two approaches, but both produced same result.</p>
  
  <p>Before any resizing:</p>
  
  <p><img src="https://i.stack.imgur.com/D0Cfg.jpg" alt="enter image description here"></p>
  
  <p>Picture after few resize actions in my application:</p>
  
  <p><img src="https://i.stack.imgur.com/MCPCz.png" alt="enter image description here"></p>
  
  <p>First approach:</p>
  
  <pre><code>image = Thumbnails.of(image).size(w,h).asBufferedImage();
  </code></pre>
  
  <p>Second approach:</p>
  
  <pre><code>image = toBufferedImage(image.getScaledInstance(w, h, Image.SCALE_SMOOTH));
  </code></pre>
  
  <p>image is instance of BufferedImage, w is new width of image and h is new hight of image</p>
  
  <p>Any idea, what I’m doing wrong?</p>