Examples of DjatokaEncodeParam


Examples of gov.lanl.adore.djatoka.DjatokaEncodeParam

            final String fileName = aSource.getName().replace(".tiff", "").replace(".tif", "");
            final File tmpFile = File.createTempFile(fileName, ".tif");
            final File tmpJp2File = File.createTempFile("djatoka-", Constants.JP2_EXT);
            final Properties properties = myProject.getProperties();
            final String kakadu = properties.getProperty("LD_LIBRARY_PATH");
            final DjatokaEncodeParam params = getEncodingParams();
            final String target = tmpJp2File.getAbsolutePath();

            // The TIFF source image (before and after resampling)
            String source = aSource.getAbsolutePath();
            String command;
View Full Code Here

Examples of gov.lanl.adore.djatoka.DjatokaEncodeParam

    protected File convertToJp2(final File aSource, final DjatokaEncodeParam aParams) throws MojoExecutionException {
        try {
            final File tmpJp2File = File.createTempFile("djatoka-", Constants.JP2_EXT);
            final Properties properties = myProject.getProperties();
            final String kakadu = properties.getProperty("LD_LIBRARY_PATH");
            final DjatokaEncodeParam params = getEncodingParams();
            final String source = aSource.getAbsolutePath();
            final String target = tmpJp2File.getAbsolutePath();

            String command;
View Full Code Here

Examples of gov.lanl.adore.djatoka.DjatokaEncodeParam

                final ICompress jp2 = new KduCompressExe();
                final File jp2Local = File.createTempFile("cache" + uri.hashCode() + "-", ".jp2");
                if (!jp2Local.delete() && LOGGER.isWarnEnabled()) {
                    LOGGER.warn("File not deleted: {}", jp2Local);
                }
                jp2.compressImage(img.getAbsolutePath(), jp2Local.getAbsolutePath(), new DjatokaEncodeParam());
                if (!img.delete() && LOGGER.isWarnEnabled()) {
                    LOGGER.warn("File not deleted: {}", img);
                }
                img = jp2Local;
            } else {
View Full Code Here

Examples of gov.lanl.adore.djatoka.DjatokaEncodeParam

     * @param params DjatokaEncodeParam containing compression parameters.
     * @throws DjatokaException
     */
    public void compressImage(BufferedImage bi, String output, DjatokaEncodeParam params) throws DjatokaException {
        if (params == null) {
            params = new DjatokaEncodeParam();
        }
        if (params.getLevels() == 0) {
            params.setLevels(ImageProcessingUtils.getLevelCount(bi.getWidth(), bi.getHeight()));
        }
        File in = null;
View Full Code Here

Examples of gov.lanl.adore.djatoka.DjatokaEncodeParam

     * @throws DjatokaException
     */
    public void compressImage(BufferedImage bi, OutputStream output, DjatokaEncodeParam params)
            throws DjatokaException {
        if (params == null) {
            params = new DjatokaEncodeParam();
        }
        if (params.getLevels() == 0) {
            params.setLevels(ImageProcessingUtils.getLevelCount(bi.getWidth(), bi.getHeight()));
        }
        File in = null;
View Full Code Here

Examples of gov.lanl.adore.djatoka.DjatokaEncodeParam

     * @param params DjatokaEncodeParam containing compression parameters.
     * @throws DjatokaException
     */
    public void compressImage(InputStream input, String output, DjatokaEncodeParam params) throws DjatokaException {
        if (params == null) {
            params = new DjatokaEncodeParam();
        }
        File inputFile;
        try {
            inputFile = File.createTempFile("tmp", ".tif");
            inputFile.deleteOnExit();
View Full Code Here

Examples of gov.lanl.adore.djatoka.DjatokaEncodeParam

     * @throws DjatokaException
     */
    public void compressImage(InputStream input, OutputStream output, DjatokaEncodeParam params)
            throws DjatokaException {
        if (params == null) {
            params = new DjatokaEncodeParam();
        }
        File inputFile = null;
        try {
            inputFile = File.createTempFile("tmp", ".tif");
            IOUtils.copyStream(input, new FileOutputStream(inputFile));
View Full Code Here

Examples of gov.lanl.adore.djatoka.DjatokaEncodeParam

     * @param params DjatokaEncodeParam containing compression parameters.
     * @throws DjatokaException
     */
    public void compressImage(String input, String output, DjatokaEncodeParam params) throws DjatokaException {
        if (params == null) {
            params = new DjatokaEncodeParam();
        }
        boolean tmp = false;
        File inputFile = null;
        if ((input.toLowerCase().endsWith(".tif") || input.toLowerCase().endsWith(".tiff") || ImageProcessingUtils
                .checkIfTiff(input)) &&
View Full Code Here

Examples of gov.lanl.adore.djatoka.DjatokaEncodeParam

     * Set the Writer Implementations Serialization properties.
     *
     * @param props writer serialization properties
     */
    public void setWriterProperties(Properties props) {
        params = new DjatokaEncodeParam(props);
    }
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.