Package com.jgraph.gaeawt.java.awt

Examples of com.jgraph.gaeawt.java.awt.Dimension


    if (chunks.size() > 1)
      throw new ImageReadException("PNG contains more than one Header");

    PNGChunkIHDR pngChunkIHDR = (PNGChunkIHDR) chunks.get(0);

    return new Dimension(pngChunkIHDR.width, pngChunkIHDR.height);
  }
View Full Code Here


    {
        PSDHeaderInfo bhi = readHeader(byteSource);
        if (bhi == null)
            throw new ImageReadException("PSD: couldn't read header");

        return new Dimension(bhi.Columns, bhi.Rows);

    }
View Full Code Here

        if (id == null)
            throw new ImageReadException("GIF: Couldn't read ImageDescriptor");

        // Prefer the size information in the ImageDescriptor; it is more reliable
        // than the size information in the header.
        return new Dimension(id.imageWidth, id.imageHeight);
    }
View Full Code Here

        if (segments.size() > 1)
            throw new ImageReadException("Redundant JFIF Data Found.");

        SOFNSegment fSOFNSegment = (SOFNSegment) segments.get(0);

        return new Dimension(fSOFNSegment.width, fSOFNSegment.height);
    }
View Full Code Here

    IcnsContents contents = readImage(byteSource);
    ArrayList images = IcnsDecoder.decodeAllImages(contents.icnsElements);
    if (images.isEmpty())
      throw new ImageReadException("No icons in ICNS file");
    BufferedImage image0 = (BufferedImage) images.get(0);
    return new Dimension(image0.getWidth(), image0.getHeight());
  }
View Full Code Here

        TiffDirectory directory = (TiffDirectory) contents.directories.get(0);

        int width = directory.findField(TIFF_TAG_IMAGE_WIDTH).getIntValue();
        int height = directory.findField(TIFF_TAG_IMAGE_LENGTH).getIntValue();

        return new Dimension(width, height);
    }
View Full Code Here

        BmpHeaderInfo bhi = readBmpHeaderInfo(byteSource, verbose);

        if (bhi == null)
            throw new ImageReadException("BMP: couldn't read header");

        return new Dimension(bhi.width, bhi.height);

    }
View Full Code Here

        FileInfo info = readHeader(byteSource);

        if (info == null)
            throw new ImageReadException("PNM: Couldn't read Header");

        return new Dimension(info.width, info.height);
    }
View Full Code Here

TOP

Related Classes of com.jgraph.gaeawt.java.awt.Dimension

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.