Examples of TIFFImageReadParam


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

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

        // 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

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

     * @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

Examples of it.geosolutions.imageio.plugins.tiff.TIFFImageReadParam

    @BeforeClass
    public static void setup() throws FileNotFoundException {
        // Definition of the url
        granuleUrl = TestData.url(ReadTypeTest.class, "img.tiff");
        // Definition of the parameters
        readParameters = new TIFFImageReadParam();
        readParameters.setSourceRegion(new Rectangle(0, 0, 40, 20));
        // Definition of the rasterDimensions
        rasterDimensions = new Rectangle(0, 0, 20, 20);
        // Wrong Raster Dimensions
        rasterDimensionsWrong = new Rectangle(41, 21, 2, 2);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.