Examples of ImageType


Examples of org.apache.myfaces.trinidadinternal.image.ImageType

    if (request == null)
      return null;

    // Get the ImageType from the request
    ImageType type = _getImageType(context, request);
    assert (type != null);

      // Get the properties from the request
    Map<Object, Object> properties = request.getRenderProperties(context);
    assert (properties != null);
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.image.ImageType

    String name = request.getLocalName();

    ImageTypeManager manager = CacheUtils.getImageTypeManager(context);
    assert (manager != null);

    ImageType type = manager.getImageType(namespace, name);

    if (type == null)
      _error(_IMAGE_TYPE_ERROR + namespace + ", " + name);

    return type;
View Full Code Here

Examples of org.apache.openjpa.example.gallery.ImageType

       
        // All these values will be pre-validated with @NotNull constraints
        // so they are safe to use
        byte[] data = value.getData();
        String fileName = value.getFileName();
        ImageType type = value.getType();
       
        // Verify the GIF type is correct5, has the correct extension and
        // the data header is either GIF87 or GIF89
        if (allowedTypes.contains(ImageType.GIF) &&
            type == ImageType.GIF &&
View Full Code Here

Examples of org.apache.openjpa.example.gallery.ImageType

       
        // All these values will be pre-validated with @NotNull constraints
        // so they are safe to use
        byte[] data = value.getData();
        String fileName = value.getFileName();
        ImageType type = value.getType();
       
        // Verify the GIF type is correct, has the correct extension and
        // the data header is either GIF87 or GIF89
        if (allowedTypes.contains(ImageType.GIF) &&
            type == ImageType.GIF &&
View Full Code Here

Examples of org.apache.pdfbox.rendering.ImageType

                            }
                        }
                    }
                }

                ImageType imageType = ImageType.RGB;
                if ("bilevel".equalsIgnoreCase(color))
                {
                    imageType = ImageType.BINARY;
                }
                else if ("gray".equalsIgnoreCase(color))
View Full Code Here

Examples of org.fluxtream.core.images.ImageType

                final ImageInputStream iis = ImageIO.createImageInputStream(new ByteArrayInputStream(imageBytes));
                final Iterator<ImageReader> imageReaders = ImageIO.getImageReaders(iis);
                if (imageReaders != null) {
                    while (imageReaders.hasNext()) {
                        final ImageReader reader = imageReaders.next();
                        final ImageType imageType = ImageType.findByFormatName(reader.getFormatName());
                        if (imageType != null) {
                            return imageType;
                        }
                    }
                }
View Full Code Here

Examples of org.fluxtream.core.images.ImageType

                    @Override
                    public ImageType getImageType() {
                        // Try to read the image type.  If we can't for some reason, then just lie and say it's a JPEG.
                        // This really should never happen, but it's good to check for it anyway and log a warning if it
                        // happens.
                        ImageType imageType = ImageUtils.getImageType(bytes);
                        if (imageType == null) {
                            imageType = ImageType.JPEG;
                            LOG.warn("FluxtreamCapturePhotoStore.getImageType(): Could not determine the media type for photo [" + getIdentifier() + "]!  Defaulting to [" + imageType.getMediaType() + "]");
                        }

                        return imageType;
                    }
                };
View Full Code Here

Examples of org.fluxtream.core.images.ImageType

    private final String comment;

    FluxtreamCapturePhoto(final long guestId, @NotNull final byte[] photoBytes, @NotNull final PhotoUploadMetadata photoUploadMetadata) throws IllegalArgumentException, NoSuchAlgorithmException, IOException, FluxtreamCapturePhotoStore.UnsupportedImageFormatException {

        // Get the image type.  If this is null, then it's not a supported type.
        final ImageType tempImageType = ImageUtils.getImageType(photoBytes);
        if (tempImageType == null) {
            throw new FluxtreamCapturePhotoStore.UnsupportedImageFormatException("The photoBytes do not contain a supported image format");
        }
        imageType = tempImageType;
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.