Home > Back-end >  Java to generate the BMP images how to keep the size of the other parameters constant, only reduce t
Java to generate the BMP images how to keep the size of the other parameters constant, only reduce t

Time:03-10

Using Java drawing, generate the BMP format pictures, but the picture is too big, I said the picture size=access/8 pixels high pixel wide * * bit depth, because to keep high image resolution and the actual width unchanged, so want to use a lower bit depth to generate the image quality of smaller, BufferedImage as if can only use eight depth, and don't know how to set up four depth, don't see graphics2D temporarily can set parameters, not Google's Thumbnails, his writing or a Java default output, write the picture will become 72 dpi, the requirement is 600 dpi, I use the Commons - imaging make the generated image of the other parameters reached the requirements, but there's no way to compression quality, also didn't find control bit depth, hope to tell some predecessors,

CodePudding user response:

In PNG format to save

CodePudding user response:

Main is my demand is BMP format picture
  • Related