java - Resizing photos without text .. is RenderingHints necessary? -


i writing quick little java class resizes image various smaller sizes (thumbnail large/small/etc). have seen examples have renderinghints in it. output file larger without.

my question is: necessary use renderinghints if images being resized have no text?

int img_width = 100; int img_height = 100;  bufferedimage resizedimage = new bufferedimage(img_width, img_height, type); graphics2d g = resizedimage.creategraphics(); g.drawimage(originalimage, 0, 0, img_width, img_height, null); g.dispose();     g.setcomposite(alphacomposite.src);  g.setrenderinghint(renderinghints.key_interpolation, renderinghints.value_interpolation_bilinear); g.setrenderinghint(renderinghints.key_rendering, renderinghints.value_render_quality); g.setrenderinghint(renderinghints.key_antialiasing, renderinghints.value_antialias_on); 

i started 45kb image, , output difference 3kb file (without renderinghints) versus 24kb file (with renderinghints)

i suppose, after reading following stackoverflow.com question/answer:

i inclined think renderinghints provide no benefit me when photos contain no text ... in case, no text = no renderinghints = smaller resized image


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -