Package com.sun.media.imageio.plugins.tiff

Examples of com.sun.media.imageio.plugins.tiff.TIFFImageReadParam


    public int getNumThumbnails(int imageIndex) throws IOException {
        return 0;
    }

    public ImageReadParam getDefaultReadParam() {
        return new TIFFImageReadParam();
    }
View Full Code Here


        // Attempt to get decompressor and color converted from the read param
       
        TIFFColorConverter colorConverter = null;
        if (imageReadParam instanceof TIFFImageReadParam) {
            TIFFImageReadParam tparam =
                (TIFFImageReadParam)imageReadParam;
            this.decompressor = tparam.getTIFFDecompressor();
            colorConverter = tparam.getColorConverter();
        }

        // If we didn't find one, use a standard decompressor
        if (this.decompressor == null) {
            if (compression ==
View Full Code Here

     * @return copied parameters.
     */
    private ImageReadParam cloneImageReadParam(ImageReadParam param,
                                               boolean copyTagSets) {
        // Create a new TIFFImageReadParam.
        TIFFImageReadParam newParam = new TIFFImageReadParam();

        // Copy the basic settings.
        newParam.setSourceSubsampling(param.getSourceXSubsampling(),
                                      param.getSourceYSubsampling(),
                                      param.getSubsamplingXOffset(),
                                      param.getSubsamplingYOffset());
        newParam.setSourceBands(param.getSourceBands());
        newParam.setDestinationBands(param.getDestinationBands());
        newParam.setDestinationOffset(param.getDestinationOffset());

        // Set the decompressor and color converter.
        if(param instanceof TIFFImageReadParam) {
            // Copy the settings from the input parameter.
            TIFFImageReadParam tparam = (TIFFImageReadParam)param;
            newParam.setTIFFDecompressor(tparam.getTIFFDecompressor());
            newParam.setColorConverter(tparam.getColorConverter());

            if(copyTagSets) {
                List tagSets = tparam.getAllowedTagSets();
                if(tagSets != null) {
                    Iterator tagSetIter = tagSets.iterator();
                    if(tagSetIter != null) {
                        while(tagSetIter.hasNext()) {
                            TIFFTagSet tagSet = (TIFFTagSet)tagSetIter.next();
View Full Code Here

TOP

Related Classes of com.sun.media.imageio.plugins.tiff.TIFFImageReadParam

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.