Examples of ImageFormat


Examples of org.apache.sanselan.ImageFormat

            throws IOException, ImageReadException, IllegalAccessException,
            IllegalArgumentException, InvocationTargetException
    {
        Map params = new HashMap();
        boolean ignoreImageData = isPhilHarveyTestImage(imageFile);
        ImageFormat imageFormat = Sanselan.guessFormat(imageFile);
        if (imageFormat.equals(ImageFormat.IMAGE_FORMAT_TIFF)
                || imageFormat.equals(ImageFormat.IMAGE_FORMAT_JPEG))
            params
                    .put(PARAM_KEY_READ_THUMBNAILS, new Boolean(
                            !ignoreImageData));

        ImageInfo imageInfoFile = Sanselan.getImageInfo(imageFile, params);
View Full Code Here

Examples of org.apache.sanselan.ImageFormat

{

    private static boolean isPng(File file) throws IOException,
            ImageReadException
    {
        ImageFormat format = Sanselan.guessFormat(file);
        return format == ImageFormat.IMAGE_FORMAT_PNG;
    }
View Full Code Here

Examples of org.apache.sanselan.ImageFormat

{

    private static boolean isTiff(File file) throws IOException,
            ImageReadException
    {
        ImageFormat format = Sanselan.guessFormat(file);
        return format == ImageFormat.IMAGE_FORMAT_TIFF;
    }
View Full Code Here

Examples of org.apache.sanselan.ImageFormat

{

    private static boolean isBmp(File file) throws IOException,
            ImageReadException
    {
        ImageFormat format = Sanselan.guessFormat(file);
        return format == ImageFormat.IMAGE_FORMAT_BMP;
    }
View Full Code Here

Examples of org.apache.sanselan.ImageFormat

public abstract class IcnsBaseTest extends SanselanTest
{

    private static boolean isIcns(File file) throws IOException, ImageReadException
    {
        ImageFormat format = Sanselan.guessFormat(file);
        return format == ImageFormat.IMAGE_FORMAT_ICNS;
    }
View Full Code Here

Examples of org.apache.sanselan.ImageFormat

                continue;

            Debug.debug("imageFile", imageFile);
            Debug.debug();

            ImageFormat imageFormat = Sanselan.guessFormat(imageFile);

            String xmpXml = Sanselan.getXmpXml(imageFile);
            if (null == xmpXml
                    && imageFormat.equals(ImageFormat.IMAGE_FORMAT_GIF))
                xmpXml = "temporary test until I can locate a GIF with XMP in the wild.";
            if (null == xmpXml)
                continue;

            assertNotNull(xmpXml);

            if (imageFormat.equals(ImageFormat.IMAGE_FORMAT_PNG))
                ;
            else if (imageFormat.equals(ImageFormat.IMAGE_FORMAT_TIFF))
                ;
            else if (imageFormat.equals(ImageFormat.IMAGE_FORMAT_GIF))
                ;
            else
                continue;

            File tempFile = this.createTempFile(imageFile.getName() + ".", "."
View Full Code Here

Examples of org.apache.sanselan.ImageFormat

public abstract class DcxBaseTest extends SanselanTest
{

    private static boolean isDcx(File file) throws IOException, ImageReadException
    {
        ImageFormat format = Sanselan.guessFormat(file);
        return format == ImageFormat.IMAGE_FORMAT_DCX;
    }
View Full Code Here

Examples of org.apache.sanselan.ImageFormat

            TiffField field = (TiffField) entries.get(i);
            String comment = field.toString();
            comments.add(comment);
        }

        ImageFormat format = ImageFormat.IMAGE_FORMAT_TIFF;
        String formatName = "TIFF Tag-based Image File Format";
        String mimeType = "image/tiff";
        int numberOfImages = contents.directories.size();
        // not accurate ... only reflects first
        boolean isProgressive = false;
View Full Code Here

Examples of org.apache.sanselan.ImageFormat

        int Number_of_components = fSOFNSegment.numberOfComponents;
        int Precision = fSOFNSegment.precision;

        int BitsPerPixel = Number_of_components * Precision;
        ImageFormat Format = ImageFormat.IMAGE_FORMAT_JPEG;
        String FormatName = "JPEG (Joint Photographic Experts Group) Format";
        String MimeType = "image/jpeg";
        // we ought to count images, but don't yet.
        int NumberOfImages = 1;
        // not accurate ... only reflects first
View Full Code Here

Examples of org.apache.sanselan.ImageFormat

        ArrayList comments = new ArrayList();
        // TODO: comments...

        int bitsPerPixel = bhi.bitsPerPixel;
        ImageFormat format = ImageFormat.IMAGE_FORMAT_BMP;
        String name = "BMP Windows Bitmap";
        String mimeType = "image/x-ms-bmp";
        // we ought to count images, but don't yet.
        int numberOfImages = -1;
        // not accurate ... only reflects first
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.