1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 7 * the License. You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 package org.apache.commons.imaging.formats.png; 18 19 import org.apache.commons.imaging.common.BinaryConstant; 20 21 public final class PngConstants { 22 23 public static final int COMPRESSION_DEFLATE_INFLATE = 0; 24 25 public static final BinaryConstant PNG_SIGNATURE = new BinaryConstant(new byte[] { (byte) 0x89, 'P', 'N', 'G', '\r', '\n', 0x1A, '\n', }); 26 27 public static final byte COMPRESSION_TYPE_INFLATE_DEFLATE = 0; 28 public static final byte FILTER_METHOD_ADAPTIVE = 0; 29 30 /* 31 * Background color Solid background color to be used when presenting the image if no better option is available. Gamma and chromaticity Gamma 32 * characteristic of the image with respect to the desired output intensity, and chromaticity characteristics of the RGB values used in the image. ICC 33 * profile Description of the color space (in the form of an International Color Consortium (ICC) profile) to which the samples in the image conform. Image 34 * histogram Estimates of how frequently the image uses each palette entry. Physical pixel dimensions Intended pixel size and aspect ratio to be used in 35 * presenting the PNG image. Significant bits The number of bits that are significant in the samples. sRGB color space A rendering intent (as defined by the 36 * International Color Consortium) and an indication that the image samples conform to this color space. Suggested palette A reduced palette that may be 37 * used when the display device is not capable of displaying the full range of colors in the image. Textual data Textual information (which may be 38 * compressed) associated with the image. Time The time when the PNG image was last modified. Transparency Alpha information that allows the reference image 39 * to be reconstructed when the alpha channel is not retained in the PNG image. 40 */ 41 42 public static final String XMP_KEYWORD = "XML:com.adobe.xmp"; 43 44 /** 45 * Parameter key. Used to indicate the PNG compression level to be used. 46 * 47 * <p> 48 * For valid values, see {@link java.util.zip.Deflater}. If no value is specified, it will use the default compression level. 49 * </p> 50 * 51 * @see java.util.zip.Deflater 52 */ 53 public static final String PARAM_KEY_PNG_COMPRESSION_LEVEL = "PNG_COMPRESSION_LEVEL"; 54 55 private PngConstants() { 56 } 57 }