📄 iimageexporter.java
字号:
package com.esri.solutions.jitk.common.export.image;
import java.io.IOException;
import java.io.OutputStream;
/**
* Defines an interface for exporting an image to
* an output stream. This interface can be implemented in a number of
* ways but was defined in order to export a map image to an output
* stream.
*/
public interface IImageExporter {
public enum Format {
JPG,
PNG,
PNG8,
GIF,
BMP,
TIFF
}
/**
* Exports an image to the specified Output Stream. The image
* will be encoded in the format specified by invoking
* {@link #getImageFormat()}.
*
* @param out Encoded image will be written to this Output Stream,
* cannot be <code>null</code>.
* @return Number of bytes written to output stream. -1 will be returned
* if export was unsuccessful.
* @throws IOException Thrown if there was a problem writing to
* Output Stream.
*/
public int exportImage (OutputStream out) throws IOException;
/**
* Returns the width of the image in pixels. The width should
* be greater than 0.
*
* @return Width of image in pixels.
*/
public int getImageWidth();
/**
* Returns the height of the image in pixels. The height
* should be greater than 0.
*
* @return Height of image in pixels.
*/
public int getImageHeight();
/**
* Returns the format of the image. The image will be encoded
* in this format when exported.
*
* @return Encoded Image Format.
*/
public Format getImageFormat();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -