[ZZ] How to store images into image files in Java applications?

xiaoxiao2021-03-06  113

Q: How to store images into image files in Java applications? A: JavaAdVancedImagingApi (included in javamediaapi) Allows complex, high performance in Java applications

Image processing. Jaiapi provides the ability to store images. Currently, JAIAPI supports the following image file formats: BMP, JEPG, PNG, PNM, Tiff. The following is given below a piece of code that stores images to the BMP file: OutputStreamos = NewFileoutputStream fileToWriteTo); BMPEncodeParamparam = newBMPEncodeParam (); ImageEncoderenc = ImageCodec.createImageEncoder ( "BMP", os, param); enc.encode (img); os.close (); programming guidelines for storing image files please refer to the following website: http : //java.sun.com/products/java-media/jai/

转载请注明原文地址:https://www.9cbs.com/read-103119.html

New Post(0)