public class FileSaver extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_JPEG_QUALITY |
Constructor and Description |
---|
FileSaver(ImagePlus imp)
Constructs a FileSaver from an ImagePlus.
|
Modifier and Type | Method and Description |
---|---|
String |
getDescriptionString()
Returns a string containing information about the specified image.
|
static int |
getJpegQuality()
Returns the current JPEG quality setting (0-100).
|
static byte[][] |
getOverlay(ImagePlus imp) |
static boolean |
okForFits(ImagePlus imp) |
static boolean |
okForGif(ImagePlus imp) |
static boolean |
okForJpeg(ImagePlus imp)
Always returns true.
|
boolean |
save()
Resaves the image.
|
boolean |
saveAsBmp()
Save the image in BMP format using a save file dialog.
|
boolean |
saveAsBmp(String path)
Save the image in BMP format using the specified path.
|
boolean |
saveAsFits()
Save the image in FITS format using a save file dialog.
|
boolean |
saveAsFits(String path)
Save the image in FITS format using the specified path.
|
boolean |
saveAsGif()
Save the image in GIF format using a save file
dialog.
|
boolean |
saveAsGif(String path)
Save the image in Gif format using the specified path.
|
boolean |
saveAsJpeg()
Save the image in JPEG format using a save file
dialog.
|
boolean |
saveAsJpeg(String path)
Save the image in JPEG format using the specified path.
|
boolean |
saveAsLut()
Save the current LUT using a save file
dialog.
|
boolean |
saveAsLut(String path)
Save the current LUT using the specified path.
|
boolean |
saveAsPgm()
Saves grayscale images in PGM (portable graymap) format
and RGB images in PPM (portable pixmap) format,
using a save file dialog.
|
boolean |
saveAsPgm(String path)
Saves grayscale images in PGM (portable graymap) format
and RGB images in PPM (portable pixmap) format,
using the specified path.
|
boolean |
saveAsPng()
Save the image in PNG format using a save file dialog.
|
boolean |
saveAsPng(String path)
Save the image in PNG format using the specified path.
|
boolean |
saveAsRaw()
Save the image or stack as raw data using a save file
dialog.
|
boolean |
saveAsRaw(String path)
Save the image as raw data using the specified path.
|
boolean |
saveAsRawStack(String path)
Save the stack as raw data using the specified path.
|
boolean |
saveAsText()
Save the image as tab-delimited text using a save file
dialog.
|
boolean |
saveAsText(String path)
Save the image as tab-delimited text using the specified path.
|
boolean |
saveAsTiff()
Saves the image or stack in TIFF format using a save file
dialog.
|
boolean |
saveAsTiff(String path)
Saves the image in TIFF format using the specified path.
|
boolean |
saveAsTiffStack(String path)
Saves the stack as a multi-image TIFF using the specified path.
|
boolean |
saveAsZip()
Uses a save file dialog to save the image or stack as a TIFF
in a ZIP archive.
|
boolean |
saveAsZip(String path)
Save the image or stack in TIFF/ZIP format using the specified path.
|
void |
saveDisplayRangesAndLuts(ImagePlus imp,
FileInfo fi) |
byte[] |
serialize()
Converts this image to a TIFF encoded array of bytes,
which can be decoded using Opener.deserialize().
|
static void |
setJpegQuality(int quality)
Specifies the image quality (0-100).
|
void |
updateImagePlus(String path,
int fileFormat) |
public static final int DEFAULT_JPEG_QUALITY
public FileSaver(ImagePlus imp)
public boolean save()
public boolean saveAsTiff()
public boolean saveAsTiff(String path)
public static byte[][] getOverlay(ImagePlus imp)
public boolean saveAsTiffStack(String path)
public byte[] serialize()
public boolean saveAsZip()
public boolean saveAsZip(String path)
public static boolean okForGif(ImagePlus imp)
public boolean saveAsGif()
public boolean saveAsGif(String path)
public static boolean okForJpeg(ImagePlus imp)
public boolean saveAsJpeg()
setJpegQuality(int)
,
getJpegQuality()
public boolean saveAsJpeg(String path)
setJpegQuality(int)
,
getJpegQuality()
public boolean saveAsBmp()
public boolean saveAsBmp(String path)
public boolean saveAsPgm()
public boolean saveAsPgm(String path)
public boolean saveAsPng()
public boolean saveAsPng(String path)
public boolean saveAsFits()
public boolean saveAsFits(String path)
public static boolean okForFits(ImagePlus imp)
public boolean saveAsRaw()
public boolean saveAsRaw(String path)
public boolean saveAsRawStack(String path)
public boolean saveAsText()
public boolean saveAsText(String path)
public boolean saveAsLut()
public boolean saveAsLut(String path)
public void updateImagePlus(String path, int fileFormat)
public String getDescriptionString()
public static void setJpegQuality(int quality)
public static int getJpegQuality()