/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
java类javax.imageio.plugins.bmp.BMPImageWriteParam的实例源码
Export.java 文件源码
项目:latexdraw-mutants
阅读 32
收藏 0
点赞 0
评论 0
Export.java 文件源码
项目:latexdraw-mutants
阅读 34
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
Export.java 文件源码
项目:latexdraw-mutants
阅读 24
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
Export.java 文件源码
项目:latexdraw-mutants
阅读 29
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
Export.java 文件源码
项目:latexdraw-mutants
阅读 44
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
Export.java 文件源码
项目:latexdraw-mutants
阅读 96
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
Export.java 文件源码
项目:latexdraw-mutants
阅读 26
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
Export.java 文件源码
项目:latexdraw-mutants
阅读 29
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
Export.java 文件源码
项目:latexdraw-mutants
阅读 63
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
Export.java 文件源码
项目:latexdraw-mutants
阅读 29
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
Export.java 文件源码
项目:latexdraw-mutants
阅读 27
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
Export.java 文件源码
项目:latexdraw-mutants
阅读 30
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
Export.java 文件源码
项目:latexdraw-mutants
阅读 32
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
Export.java 文件源码
项目:latexdraw-mutants
阅读 29
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
Export.java 文件源码
项目:latexdraw-mutants
阅读 27
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
Export.java 文件源码
项目:latexdraw-mutants
阅读 28
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
Export.java 文件源码
项目:latexdraw-mutants
阅读 30
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
Export.java 文件源码
项目:latexdraw-mutants
阅读 29
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
Export.java 文件源码
项目:latexdraw-mutants
阅读 27
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
Export.java 文件源码
项目:latexdraw-mutants
阅读 27
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
Export.java 文件源码
项目:latexdraw-mutants
阅读 45
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
Export.java 文件源码
项目:latexdraw-mutants
阅读 30
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
Export.java 文件源码
项目:latexdraw-mutants
阅读 23
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
Export.java 文件源码
项目:latexdraw-mutants
阅读 27
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
Export.java 文件源码
项目:latexdraw-mutants
阅读 23
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
Export.java 文件源码
项目:latexdraw-mutants
阅读 31
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
Export.java 文件源码
项目:latexdraw-mutants
阅读 31
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
Export.java 文件源码
项目:latexdraw-mutants
阅读 25
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
Export.java 文件源码
项目:latexdraw-mutants
阅读 29
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}
Export.java 文件源码
项目:latexdraw-mutants
阅读 30
收藏 0
点赞 0
评论 0
/**
* Exports the drawing as a BMP picture.
* @param file The targeted location.
* @return true if the picture was successfully created.
*/
protected boolean exportAsBMP(final File file){
final RenderedImage rendImage = createRenderedImage();
try {
final ImageWriteParam iwparam = new BMPImageWriteParam();
final ImageWriter iw = ImageIO.getImageWritersByFormatName("bmp").next();//$NON-NLS-1$
try(final ImageOutputStream ios = ImageIO.createImageOutputStream(file);) {
iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iw.setOutput(ios);
iw.write(null, new IIOImage(rendImage, null, null), iwparam);
iw.dispose();
return true;
}
}
catch(final IOException e) { BadaboomCollector.INSTANCE.add(e); }
return false;
}