ij.process.StackConverter Java Examples

The following examples show how to use ij.process.StackConverter. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ExportTransparentPNG.java    From 3Dscript with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public static void export(ImagePlus imp, File dir, double gamma) throws IOException {
	int type = imp.getType();
	if(type != ImagePlus.COLOR_RGB) {
		imp = imp.duplicate();
		new StackConverter(imp).convertToRGB();
	}
	exportRGB(imp, dir, gamma);
}