java

Write Multiple Images Tiff File (JAI vs. ImageIO)

package other; import java.awt.image.RenderedImage; import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import javax.imageio.IIOImage; import javax.imageio.ImageIO; import javax.imageio.ImageWriter; import javax.imageio.stream.ImageOutputStream; import javax.media.jai.PlanarImage; import javax.media.jai.RenderedImageAdapter; import com.sun.media.jai.codec.ImageCodec; import com.sun.media.jai.codec.ImageEncoder; import com.sun.media.jai.codec.TIFFEncodeParam; public class MultiPageRead { public static void main(String[] args) { String filepath = “D:\\Users\\hp\\Desktop\\test\\”; PlanarImage[] images = new PlanarImage[7]; // images[0]=… Continue reading Write Multiple Images Tiff File (JAI vs. ImageIO)