@Test(dataProvider = "createBasicImages", enabled = true) public void testImageIoWrite(final RenderedImage im, final String outputName) throws IOException { final ByteArrayOutputStream baoStream = new ByteArrayOutputStream(); ImageIO.write(im, "webp", baoStream); assertTrue(baoStream.size() > 0); final String testName = "ImageIo"; final File file = createOutputFile(testName, outputName); final FileOutputStream foStream = new FileOutputStream(file); baoStream.writeTo(foStream); foStream.close(); }
@Override public void write( IIOMetadata streamMetadata, IIOImage image, ImageWriteParam param ) throws IOException { if ( param == null ) { param = getDefaultWriteParam(); } WebPWriteParam writeParam = (WebPWriteParam) param; ImageOutputStream output = ( ImageOutputStream ) getOutput(); RenderedImage ri = image.getRenderedImage(); byte[] encodedData = WebP.encode(writeParam, ri); output.write( encodedData ); }
WebPWriter extends ImageWriter { @Override public void write( IIOMetadata streamMetadata, IIOImage image, ImageWriteParam param ) throws IOException { if ( param == null ) { param = getDefaultWriteParam(); } WebPWriteParam writeParam = (WebPWriteParam) param; ImageOutputStream output = ( ImageOutputStream ) getOutput(); RenderedImage ri = image.getRenderedImage(); byte[] encodedData = WebP.encode(writeParam, ri); output.write( encodedData ); } }
WebPWriter extends ImageWriter { @Override public void write( IIOMetadata streamMetadata, IIOImage image, ImageWriteParam param ) throws IOException { if ( param == null ) { param = getDefaultWriteParam(); } WebPWriteParam writeParam = (WebPWriteParam) param; ImageOutputStream output = ( ImageOutputStream ) getOutput(); RenderedImage ri = image.getRenderedImage(); byte[] encodedData = WebP.encode(writeParam, ri); output.write( encodedData ); } WebPWriter( ImageWriterSpi originatingProvider ); }
WebPWriter extends ImageWriter { @Override public void write( IIOMetadata streamMetadata, IIOImage image, ImageWriteParam param ) throws IOException { if ( param == null ) { param = getDefaultWriteParam(); } WebPWriteParam writeParam = (WebPWriteParam) param; ImageOutputStream output = ( ImageOutputStream ) getOutput(); RenderedImage ri = image.getRenderedImage(); byte[] encodedData = WebP.encode(writeParam, ri); output.write( encodedData ); } WebPWriter( ImageWriterSpi originatingProvider ); @Override ImageWriteParam getDefaultWriteParam(); @Override IIOMetadata convertImageMetadata( IIOMetadata inData, ImageTypeSpecifier imageType, ImageWriteParam param ); @Override IIOMetadata convertStreamMetadata( IIOMetadata inData, ImageWriteParam param ); @Override IIOMetadata getDefaultImageMetadata( ImageTypeSpecifier imageType, ImageWriteParam param ); @Override IIOMetadata getDefaultStreamMetadata( ImageWriteParam param ); @Override void write( IIOMetadata streamMetadata, IIOImage image, ImageWriteParam param ); }
WebPWriter extends ImageWriter { @Override public void write( IIOMetadata streamMetadata, IIOImage image, ImageWriteParam param ) throws IOException { if ( param == null ) { param = getDefaultWriteParam(); } WebPWriteParam writeParam = (WebPWriteParam) param; ImageOutputStream output = ( ImageOutputStream ) getOutput(); RenderedImage ri = image.getRenderedImage(); byte[] encodedData = WebP.encode(writeParam, ri); output.write( encodedData ); } WebPWriter( ImageWriterSpi originatingProvider ); @Override ImageWriteParam getDefaultWriteParam(); @Override IIOMetadata convertImageMetadata( IIOMetadata inData, ImageTypeSpecifier imageType, ImageWriteParam param ); @Override IIOMetadata convertStreamMetadata( IIOMetadata inData, ImageWriteParam param ); @Override IIOMetadata getDefaultImageMetadata( ImageTypeSpecifier imageType, ImageWriteParam param ); @Override IIOMetadata getDefaultStreamMetadata( ImageWriteParam param ); @Override void write( IIOMetadata streamMetadata, IIOImage image, ImageWriteParam param );  }