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

org.apache.commons.imaging.ImagingConstants Maven / Gradle / Ivy

There is a newer version: 1.0.0-alpha5
Show newest version
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.commons.imaging;

/**
 * Defines constants that may be used in passing options to
 * ImageParser read/write implementations, the utility routines
 * implemented in the Imaging class, and throughout the
 * Apache Commons Imaging package.  Individual ImageParser
 * implementations may define their own format-specific options.
 */
public final class ImagingConstants {

    /**
     * Parameter key. Used to hint the filename when reading from a byte array
     * or InputStream. The filename hint can help disambiguate what file the
     * image format.
     * 

* Applies to read operations. *

* Valid values: filename as string *

* * @see java.io.InputStream */ public static final String PARAM_KEY_FILENAME = "FILENAME"; /** * Parameter key. Used in write operations to indicate desired image format. *

* Valid values: Any format defined in ImageFormat, such as * ImageFormat.IMAGE_FORMAT_PNG. *

* * @see org.apache.commons.imaging.ImageFormats */ public static final String PARAM_KEY_FORMAT = "FORMAT"; /** * Parameter key. Used in write operations to indicate desired compression * algorithm. *

* Currently only applies to writing TIFF image files. *

* Valid values: TiffConstants.TIFF_COMPRESSION_UNCOMPRESSED, * TiffConstants.TIFF_COMPRESSION_CCITT_1D, * TiffConstants.TIFF_COMPRESSION_LZW, * TiffConstants.TIFF_COMPRESSION_PACKBITS. *

* * @see org.apache.commons.imaging.formats.tiff.constants.TiffConstants */ public static final String PARAM_KEY_COMPRESSION = "COMPRESSION"; public static final String BUFFERED_IMAGE_FACTORY = "BUFFERED_IMAGE_FACTORY"; /** * Parameter key. Indicates whether to read embedded thumbnails. *

* Only applies to read EXIF metadata from JPEG/JFIF files. *

* Valid values: Boolean.TRUE and Boolean.FALSE. *

* * @see org.apache.commons.imaging.formats.tiff.constants.TiffConstants */ public static final String PARAM_KEY_READ_THUMBNAILS = "READ_THUMBNAILS"; /** * Parameter key. Indicates whether to throw exceptions when parsing invalid * files, or whether to tolerate small problems. *

* Valid values: Boolean.TRUE and Boolean.FALSE. Default value: * Boolean.FALSE. *

* * @see org.apache.commons.imaging.formats.tiff.constants.TiffConstants */ public static final String PARAM_KEY_STRICT = "STRICT"; /** * Parameter key. * * Only used when writing images. *

* Valid values: TiffOutputSet to write into the image's EXIF metadata. *

* * @see org.apache.commons.imaging.formats.tiff.write.TiffOutputSet */ public static final String PARAM_KEY_EXIF = "EXIF"; /** * Parameter key. * * Only used when writing images. *

* Valid values: String of XMP XML. *

*/ public static final String PARAM_KEY_XMP_XML = "XMP_XML"; /** * Parameter key. Used in write operations to indicate the desired pixel * density (DPI), and/or aspect ratio. *

* Valid values: PixelDensity *

* * @see org.apache.commons.imaging.PixelDensity */ public static final String PARAM_KEY_PIXEL_DENSITY = "PIXEL_DENSITY"; private ImagingConstants() { } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy