Examples of DjatokaEncodeParam


Examples of gov.lanl.adore.djatoka.DjatokaEncodeParam

   * @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;
    try {
      in = IOUtils.createTempTiff(bi);
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;
    File out = null;
    try {
View Full Code Here

Examples of gov.lanl.adore.djatoka.DjatokaEncodeParam

   * @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();
      IOUtils.copyStream(input, new FileOutputStream(inputFile));
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));
      if (params.getLevels() == 0) {
View Full Code Here

Examples of gov.lanl.adore.djatoka.DjatokaEncodeParam

   * @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. See djatoka.properties for key/value examples.
   * @param props writer serialization properties
   */
  public void setWriterProperties(Properties props) {
    params = new DjatokaEncodeParam(props);
  }
View Full Code Here

Examples of gov.lanl.adore.djatoka.DjatokaEncodeParam

    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.DjatokaEncodeParam

        mySource = aSource;
        myDest = aDest;
        myExts = aExts;
        myThreadRunsUnattended = aUnattendedRun;

        myParams = new DjatokaEncodeParam(aCfg);
        myCompression = new KduCompressExe();

        // Convert maximum file size to bytes
        myMaxSize = Long.parseLong(aCfg.getProperty(MAX_SIZE, "200")) * 1048576;
    }
View Full Code Here

Examples of gov.lanl.adore.djatoka.DjatokaEncodeParam

            final Properties properties = new Properties();
            String maxSize;

            try {
                properties.loadFromXML(bis);
                myParams = new DjatokaEncodeParam(properties);

                // While we're getting settings, let's remember the maxSize
                maxSize = properties.getProperty(Constants.MAX_SIZE, "200");

                if (LOGGER.isDebugEnabled()) {
View Full Code Here

Examples of gov.lanl.adore.djatoka.DjatokaEncodeParam

                    }
                } else if (tifPattern.matcher(csv[myCsvPathCol]).matches()) {
                    final File tiff = new File(csv[myCsvPathCol]);

                    if (tiff.exists() && tiff.canRead()) {
                        final DjatokaEncodeParam params = getEncodingParams();

                        if (tiff.length() < myMaxSize) {
                            final File jp2 = convertToJp2(tiff, params);

                            if (jp2 != null) {
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.