Examples of compressImage()


Examples of gov.lanl.adore.djatoka.ICompress.compressImage()

    try {
      if (fmt == null || !ImageProcessingUtils.isJp2Type(fmt)) {
        ICompress jp2 = new KduCompressExe();
        File jp2Local = File.createTempFile("cache" + uri.hashCode() + "-", ".jp2");
        jp2Local.delete();
        jp2.compressImage(img.getAbsolutePath(), jp2Local.getAbsolutePath(), new DjatokaEncodeParam());
        img.delete();
        img = jp2Local;
      } else {
        try {
          IExtract ex = new KduExtractExe();
View Full Code Here

Examples of gov.lanl.adore.djatoka.ICompress.compressImage()

                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.kdu.KduCompressExe.compressImage()

      BufferedOutputStream bos = null;
      try {
        params.setLevels(ImageProcessingUtils.getLevelCount(bi.getWidth(), bi.getHeight()));
        KduCompressExe encoder = new KduCompressExe();
        bos = new BufferedOutputStream(os);
        encoder.compressImage(bi, bos, params);
        bos.close();
      } catch (IOException e) {
        logger.error(e,e);
        throw new FormatIOException(e);
      } catch (DjatokaException e) {
View Full Code Here

Examples of gov.lanl.adore.djatoka.kdu.KduCompressExe.compressImage()

    try {
      if (fmt == null || !ImageProcessingUtils.isJp2Type(fmt)) {
        ICompress jp2 = new KduCompressExe();
        File jp2Local = File.createTempFile("cache" + uri.hashCode() + "-", ".jp2");
        jp2Local.delete();
        jp2.compressImage(img.getAbsolutePath(), jp2Local.getAbsolutePath(), new DjatokaEncodeParam());
        img.delete();
        img = jp2Local;
      } else {
        try {
          IExtract ex = new KduExtractExe();
View Full Code Here

Examples of gov.lanl.adore.djatoka.kdu.KduCompressExe.compressImage()

                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.kdu.KduCompressExe.compressImage()

            BufferedOutputStream bos = null;
            try {
                params.setLevels(ImageProcessingUtils.getLevelCount(bi.getWidth(), bi.getHeight()));
                KduCompressExe encoder = new KduCompressExe();
                bos = new BufferedOutputStream(os);
                encoder.compressImage(bi, bos, params);
                bos.close();
            } catch (IOException details) {
                LOGGER.error(details.getMessage(), details);
                throw new FormatIOException(details.getMessage(), details);
            } catch (DjatokaException details) {
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.