Package com.alibaba.simpleimage

Examples of com.alibaba.simpleimage.SimpleImageException


        try {
            this.stream = new FileOutputStream(output);
            this.needClean = true;
        } catch (FileNotFoundException e) {
            throw new SimpleImageException(e);
        }

        this.param = param;
        this.outputFormat = format;
View Full Code Here


        try {
            this.stream = new FileOutputStream(output);
            this.needClean = true;
        } catch (FileNotFoundException e) {
            throw new SimpleImageException(e);
        }

        this.param = param;
        this.outputFormat = format;
View Full Code Here

            if (stream != null) {
                try {
                    stream.flush();
                    stream.close();
                } catch (IOException e) {
                    throw new SimpleImageException(e);
                }
            }
        }

        this.stream = null;
View Full Code Here

                image = imageRender.render();
            }

            ImageWriteHelper.write(image, stream, outputFormat, param);
        } catch (Exception e) {
            throw new SimpleImageException(e);
        }

        return null;
    }
View Full Code Here

        for (int i = 0; i < imgWrapper.getNumOfImages(); i++) {
            PlanarImage img = imgWrapper.getAsPlanarImage(i);
            Node imgMetadata = imgWrapper.getMetadata(i);

            if (img.getColorModel() instanceof IndexColorModel) {
                throw new SimpleImageException(
                                               "Unsupported scale image with IndexColorModel, please convert to RGB color model first");
            }
            // No more need, index color model will triger throws exception first
            // NodeUtils.removeChild(imgMetadata, "LocalColorTable");
            Node imgDescNode = NodeUtils.getChild(imgMetadata, "ImageDescriptor");
View Full Code Here

TOP

Related Classes of com.alibaba.simpleimage.SimpleImageException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.