Demos and Usage of com.sun.image.codec.jpeg.JPEGImageEncoder.setJPEGEncodeParam(JPEGEncodeParam jep)


   1:           FileOutputStream("smallMap.jpeg"));
   2:         JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
   3:         JPEGEncodeParam param = encoder.
   4:         ...
   5:         param.setQuality(1, false);
   6:         encoder.setJPEGEncodeParam(param);
   7:         encoder.encode(thumbImage);
   8:         out.close(); 
   9:         System.out.println("Done.");

View Full Code Here
   1:             bimg.createGraphics().drawImage(image, 0, 0, null);
   2:             JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(outputStream);
   3:             JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(bimg);
   4:         ...
   5:             param.setQuality(1.0f, false);
   6:             encoder.setJPEGEncodeParam(param);
   7:             encoder.encode(bimg);
   8:             }
   9:         catch (Exception e)

View Full Code Here
   1: import com.sun.image.codec.jpeg.JPEGEncodeParam;
   2: import com.sun.image.codec.jpeg.JPEGImageEncoder;
   3: 
   4:         ...
   5:         BufferedOutputStream output = new BufferedOutputStream(sout);
   6:         JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(output);
   7:         JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(thumbImage);
   8:         ...
   9: 
  10:         encoder.setJPEGEncodeParam(param);
  11:         encoder.encode(thumbImage);

View Full Code Here
   1:                 OutputStream os = new FileOutputStream(full_filename);
   2:                 JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(os);
   3:                 JPEGEncodeParam encodeParams = encoder.getDefaultJPEGEncodeParam(i);
   4:         ...
   5:                 encodeParams.setQuality(Globals.JPEGQuality, true);
   6:                 encoder.setJPEGEncodeParam(encodeParams);
   7:                 encoder.encode(i);
   8:                 os.close();
   9:                 System.out.println("Encoding successful");

View Full Code Here
   1:             ByteArrayOutputStream out = new ByteArrayOutputStream();
   2:             JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
   3:             JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(bi);
   4:         ...
   5:             param.setQuality(1.0f, false);
   6:             encoder.setJPEGEncodeParam(param);
   7:             encoder.encode(bi);
   8: 
   9:             ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());

View Full Code Here
   1: import com.sun.image.codec.jpeg.JPEGEncodeParam;
   2: import com.sun.image.codec.jpeg.JPEGImageEncoder;
   3: 
   4:         ...
   5:                             getThumbFile(new File(picture.getFilename()))));
   6:             JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
   7:             JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(thumb);
   8:         ...
   9:             param.setQuality(quality / 100.0f, false);
  10:             encoder.setJPEGEncodeParam(param);
  11:             encoder.encode(thumb);

View Full Code Here
   1: import com.sun.image.codec.jpeg.JPEGImageDecoder;
   2: import com.sun.image.codec.jpeg.JPEGImageEncoder;
   3: import de.jose.Application;
   4:         ...
   5:         FileOutputStream out = new FileOutputStream(f);
   6:         JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
   7:         JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(img);
   8:         ...
   9:         encoder.setJPEGEncodeParam(param);
  10:         encoder.encode(img);
  11:         ...
  12:         ByteArrayOutputStream out = new ByteArrayOutputStream();
  13:         JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);

View Full Code Here
   1:             OutputStream os = new FileOutputStream(full_filename);
   2:             JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(os);
   3:             JPEGEncodeParam encodeParams = encoder.getDefaultJPEGEncodeParam(interfaceImage);
   4:         ...
   5:             encodeParams.setQuality(Globals.JPEGQuality, true);
   6:             encoder.setJPEGEncodeParam(encodeParams);
   7:             encoder.encode(interfaceImage);
   8:             os.close();
   9:             System.out.println("Encoding successful");

View Full Code Here
   1:                     OutputStream os = new FileOutputStream(full_filename);
   2:                     JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(os);
   3:                     JPEGEncodeParam encodeParams = encoder.getDefaultJPEGEncodeParam(i);
   4:         ...
   5:                     encodeParams.setQuality(Globals.JPEGQuality, true);
   6:                     encoder.setJPEGEncodeParam(encodeParams);
   7:                     encoder.encode(i);
   8:                     os.close();
   9:                     Utils.dbgPrint("JPEG Encode complete", 2);

View Full Code Here
   1: import com.sun.image.codec.jpeg.JPEGEncodeParam;
   2: import com.sun.image.codec.jpeg.JPEGImageEncoder;
   3: 
   4:         ...
   5:         BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(file));
   6:         JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
   7:         JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(img);
   8:         ...
   9:         param.setQuality(quality / 100.0f, false);
  10:         encoder.setJPEGEncodeParam(param);
  11:         encoder.encode(img);

View Full Code Here