All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jpedal.io.TiffHelper Maven / Gradle / Ivy

There is a newer version: 7.15.25
Show newest version
/*
 * ===========================================
 * Java Pdf Extraction Decoding Access Library
 * ===========================================
 *
 * Project Info:  http://www.idrsolutions.com
 * Help section for developers at http://www.idrsolutions.com/support/
 *
 * (C) Copyright 1997-2017 IDRsolutions and Contributors.
 *
 * This file is part of JPedal/JPDF2HTML5
 *
 @LICENSE@
 *
 * ---------------
 * TiffHelper.java
 * ---------------
 */
package org.jpedal.io;

import java.awt.image.BufferedImage;
import org.jpedal.external.ExternalHandlers;

public class TiffHelper {

    //private ImageDecoder dec;
    private final int pageCount;
    private final String file;

    /**
     * setup access to Tif file and also read page count
     */
    public TiffHelper(final String file) {

        this.file = file;

        pageCount = ExternalHandlers.ImageLib.getTiffPageCount(file);

    }

    public int getTiffPageCount() {
        return pageCount;
    }

    public BufferedImage getImage(final int tiffImageToLoad) {

        return ExternalHandlers.ImageLib.getTiffImage(tiffImageToLoad, file);

    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy