![]() ![]() ![]() ![]() The following code example is a simple version of a complete image edit/touch up program which uses a revised version of the The returned array of names will include any additional plug-ins that are installed and any of these names may be used as a format name to select an image writer. String writerNames = ImageIO.getWriterFormatNames() These methods return an array of strings listing all of the formats supported in this JRE. If you are interested in what file formats are available to load or save in your system, you may use the getReaderFormatNames and getWriterFormatNames methods of the ImageIO class. The Image I/O class provides a way to plug in support for additional formats which can be used, and many such plug-ins exist. They have the advantage of being readily available. Loss of compression, not good for text, screenshots, or any application where the original image must be preserved exactlyįor most applications it is sufficient to use one of these standard plugins. Supports only 256 colors and no translucencyīetter alternative than GIF or JPG for high colour lossless images, supports translucency Supports animation, and transparent pixels ![]() The term plug-in is used since Image I/O is extensible and can support a wide range of formats.īut the following standard image format plugins : JPEG, PNG, GIF, BMP and WBMP are always be present.Įach image format has its advantages and disadvantages: Format The ImageIO.write method calls the code that implements PNG writing a “PNG writer plug-in”. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |