Module ij
Package ij.plugin

# Class PNG_Writer

java.lang.Object
ij.plugin.PNG_Writer

All Implemented Interfaces:
  `PlugIn`

public class PNG_Writer extends Object implements PlugIn
Saves in PNG format using the ImageIO classes. RGB images are saved as RGB PNGs. Other image types are saved as 8-bit PNGs, except for 16-bit images with the default grayscale LUT, which are saved as 16-bit PNGs. With 8-bit images, the value of the transparent index can be set in the Edit/Options/Input-Output dialog, or by calling Prefs.setTransparentIndex(index), where 0invalid input: '<'=indexinvalid input: '<'=255.

## Constructor Summary

Constructors
Constructor
Description
`PNG_Writer()`

## Method Summary

Modifier and Type
Method
Description
`void`
`run(String path)`
This method is called when the plugin is loaded.
`void`
`writeImage(ImagePlus imp, String path, int transparentIndex)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### PNG_Writer

public PNG_Writer()

## Method Details

### run

public void run(String path)
Description copied from interface: `PlugIn`
This method is called when the plugin is loaded. 'arg', which may be blank, is the argument specified for this plugin in IJ_Props.txt.

Specified by:
  `run` in interface `PlugIn`

### writeImage

public void writeImage(ImagePlus imp, String path, int transparentIndex) throws Exception

Throws:
  `Exception`