Package com.google.code.appengine.awt.image

Examples of com.google.code.appengine.awt.image.ColorModel.createCompatibleSampleModel()


                    final int alphaMask, final int transferType,
                    final boolean isAlphaPremultiplied) {
        final ColorModel model = new DirectColorModel(colorSpace, 32, redMask,
                        greenMask, blueMask, alphaMask, isAlphaPremultiplied,
                        transferType);
        return new ImageTypeSpecifier(model, model.createCompatibleSampleModel(
            1, 1));
    }

    public static ImageTypeSpecifier createInterleaved(ColorSpace colorSpace,
                                                       int[] bandOffsets,
View Full Code Here


            numBits[1] = bits;
        }
        int transparency = hasAlpha ? Transparency.TRANSLUCENT : Transparency.OPAQUE;
        ColorModel model = new ComponentColorModel(colorSpace, numBits, hasAlpha, isAlphaPremultiplied, transparency, dataType);

        return new ImageTypeSpecifier(model, model.createCompatibleSampleModel(1, 1));
    }


    public static ImageTypeSpecifier createIndexed(byte[] redLUT,
                                                   byte[] greenLUT,
View Full Code Here

           model = new IndexColorModel(bits, size, redLUT, greenLUT, blueLUT);
       } else {
           model = new IndexColorModel(bits, size, redLUT, greenLUT, blueLUT, alphaLUT);
       }
      
       return new ImageTypeSpecifier(model, model.createCompatibleSampleModel(1, 1));
    }

    public static ImageTypeSpecifier createFromBufferedImageType(int bufferedImageType) {
        switch (bufferedImageType) {
        case BufferedImage.TYPE_INT_RGB :
View Full Code Here

    @Override
    public Iterator<ImageTypeSpecifier> getImageTypes(final int i)
                    throws IOException {
        final ColorModel model = getImage(i).getColorModel();
        final ImageTypeSpecifier[] spec = { new ImageTypeSpecifier(model,
                        model.createCompatibleSampleModel(1, 1)) };
        return Arrays.asList(spec).iterator();
    }

    @Override
    public IIOMetadata getStreamMetadata() throws IOException {
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.