title: Programmatically Reducing JPEG file size
body: <p>Apologies for any ignorance, but I have never worked with jpeg images (let alone any types of images) in Java before.</p>
  
  <p>Supposing I want to send a jpeg image from a web service to a client. Is there any way that I can reduce the jpeg file size by manipulating the colour profile of the image in some way?</p>
  
  <p>I have already been able to reduce the image size by scaling it using a neat tool for BufferedImages called <code>imgscalr</code>. See <a href="http://www.thebuzzmedia.com/software/imgscalr-java-image-scaling-library/" rel="noreferrer">here</a>.</p>
  
  <p>I would also like a jpeg that has less colours than a high quality jpeg image. For example, I would like to be able to use 8bit colour in my jpeg instead of say 16bit colour.</p>
  
  <p>What exactly would I need to change if I have a BufferedImage from Java's 2D package?</p>