Converting Pixel Array to Image in Java -


i have used this code image array of pixels.

  • convertto2dwithoutusinggetrgb method reading image pixel array
  • writetofile method pixel array image

now convert array of pixels image. when convert it, losing image data.

  1. initial image size: 80kb jpg
  2. duplicate image size: 71kb jpg

i can notice difference between both images, java produced image has sort of white-noise.

i reproduce image without single pixel loss of data, how achieve in java?

the jpg file format uses lossy compression algorithm means files generates have slight differences original. can change quality setting compress more or less can't save original size without modifications.

this why jpg isn't recommended image editing. use lossless format instead, png.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -