Package org.apache.sanselan

Examples of org.apache.sanselan.ImageInfo


        boolean usesPalette = colorTable != null;
        int colorType = ImageInfo.COLOR_TYPE_RGB;
        String compressionAlgorithm = ImageInfo.COMPRESSION_ALGORITHM_RLE;

        ImageInfo result = new ImageInfo(formatDetails, bitsPerPixel, comments,
                format, name, height, mimeType, numberOfImages,
                physicalHeightDpi, physicalHeightInch, physicalWidthDpi,
                physicalWidthInch, width, isProgressive, isTransparent,
                usesPalette, colorType, compressionAlgorithm);
View Full Code Here


    public boolean dumpImageFile(PrintWriter pw, ByteSource byteSource)
            throws ImageReadException, IOException
    {
        pw.println("bmp.dumpImageFile");

        ImageInfo imageData = getImageInfo(byteSource, null);
        if (imageData == null)
            return false;

        imageData.toString(pw, "");

        pw.println("");

        return true;
    }
View Full Code Here

    public ImageInfo getImageInfo(ByteSource byteSource, Map params)
            throws ImageReadException, IOException
    {
        XbmHeader xbmHeader = readXbmHeader(byteSource);
        return new ImageInfo("XBM", 1,
                new ArrayList(), ImageFormat.IMAGE_FORMAT_XBM,
                "X BitMap",
                xbmHeader.height, "image/x-xbitmap", 1,
                0, 0, 0, 0,
                xbmHeader.width, false, false, false,
View Full Code Here

            break;
        default:
            compressionAlgorithm = ImageInfo.COMPRESSION_ALGORITHM_UNKNOWN;
        }

        ImageInfo result = new ImageInfo(FormatDetails, BitsPerPixel, Comments,
                Format, FormatName, Height, MimeType, NumberOfImages,
                PhysicalHeightDpi, PhysicalHeightInch, PhysicalWidthDpi,
                PhysicalWidthInch, Width, isProgressive, isTransparent,
                usesPalette, ColorType, compressionAlgorithm);
View Full Code Here

            throws ImageReadException, IOException
    {
        pw.println("gif.dumpImageFile");

        {
            ImageInfo fImageData = getImageInfo(byteSource);
            if (fImageData == null)
                return false;

            fImageData.toString(pw, "");
        }
        {
            ImageContents imageContents = readImageContents(byteSource);

            imageContents.dump(pw);
View Full Code Here

        boolean usesPalette = true;
        int colorType = ImageInfo.COLOR_TYPE_RGB;
        String compressionAlgorithm = ImageInfo.COMPRESSION_ALGORITHM_LZW;

        ImageInfo result = new ImageInfo(FormatDetails, BitsPerPixel, Comments,
                Format, FormatName, height, MimeType, NumberOfImages,
                PhysicalHeightDpi, PhysicalHeightInch, PhysicalWidthDpi,
                PhysicalWidthInch, width, isProgressive, isTransparent,
                usesPalette, colorType, compressionAlgorithm);
View Full Code Here

            throws ImageReadException, IOException
    {
        pw.println("gif.dumpImageFile");

        {
            ImageInfo imageData = getImageInfo(byteSource);
            if (imageData == null)
                return false;

            imageData.toString(pw, "");
        }
        {
            ImageContents blocks = readFile(byteSource, false);

            if (blocks == null)
View Full Code Here

    {
        PcxHeader pcxHeader = readPcxHeader(byteSource);
        Dimension size = getImageSize(byteSource, params);
        int metricHDpi = (int) (pcxHeader.hDpi * 1000.0 / 2.54);
        int metricVDpi = (int) (pcxHeader.vDpi * 1000.0 / 2.54);
        return new ImageInfo("PCX", pcxHeader.nPlanes * pcxHeader.bitsPerPixel, new ArrayList(),
                ImageFormat.IMAGE_FORMAT_PCX, "ZSoft PCX Image", size.height, "image/x-pcx", 1,
                metricVDpi, pcxHeader.vDpi / metricVDpi, metricHDpi, pcxHeader.hDpi / metricHDpi,
                size.width, false, false,
                !(pcxHeader.nPlanes == 3 && pcxHeader.bitsPerPixel == 8),
                ImageInfo.COLOR_TYPE_RGB,
View Full Code Here

        boolean usesPalette = false;

        int ColorType = info.getColorType();
        String compressionAlgorithm = ImageInfo.COMPRESSION_ALGORITHM_NONE;

        ImageInfo result = new ImageInfo(FormatDetails, BitsPerPixel, Comments,
                Format, FormatName, info.height, MimeType, NumberOfImages,
                PhysicalHeightDpi, PhysicalHeightInch, PhysicalWidthDpi,
                PhysicalWidthInch, info.width, isProgressive, isTransparent,
                usesPalette, ColorType, compressionAlgorithm);
View Full Code Here

            throws ImageReadException, IOException
    {
        pw.println("pnm.dumpImageFile");

        {
            ImageInfo imageData = getImageInfo(byteSource);
            if (imageData == null)
                return false;

            imageData.toString(pw, "");
        }

        pw.println("");

        return true;
View Full Code Here

TOP

Related Classes of org.apache.sanselan.ImageInfo

Copyright © 2018 www.massapicom. 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.