Examples of PNGDecodeParam


Examples of com.sun.media.jai.codec.PNGDecodeParam

/* 149 */     return new PNGImageDecoder(new FileInputStream(src), p);
/*     */   }
/*     */
/*     */   protected ImageDecoder createImageDecoder(SeekableStream src, ImageDecodeParam param)
/*     */   {
/* 154 */     PNGDecodeParam p = null;
/* 155 */     if (param != null) {
/* 156 */       p = (PNGDecodeParam)param;
/*     */     }
/* 158 */     return new PNGImageDecoder(src, p);
/*     */   }
View Full Code Here

Examples of com.sun.media.jai.codec.PNGDecodeParam

/*  390 */       stream = new BufferedInputStream(stream);
/*      */     }
/*  392 */     DataInputStream distream = new DataInputStream(stream);
/*      */
/*  394 */     if (decodeParam == null) {
/*  395 */       decodeParam = new PNGDecodeParam();
/*      */     }
/*  397 */     this.decodeParam = decodeParam;
/*      */
/*  400 */     this.suppressAlpha = decodeParam.getSuppressAlpha();
/*  401 */     this.expandPalette = decodeParam.getExpandPalette();
View Full Code Here

Examples of org.apache.batik.ext.awt.image.codec.PNGDecodeParam

        Thread t = new Thread() {
                public void run() {
                    Filter filt;
                    try {
                        PNGDecodeParam param = new PNGDecodeParam();
                        param.setExpandPalette(true);
                       
                        if (raw)
                            param.setPerformGammaCorrection(false);
                        else {
                            param.setPerformGammaCorrection(true);
                            param.setDisplayExponent(2.2f); // sRGB gamma
                        }
                        CachableRed cr = new PNGRed(is, param);
                        dr.setBounds(new Rectangle2D.Double
                                     (0, 0, cr.getWidth(), cr.getHeight()));
View Full Code Here

Examples of org.apache.batik.ext.awt.image.codec.PNGDecodeParam

        Thread t = new Thread() {
                public void run() {
                    Filter filt;
                    try {
                        PNGDecodeParam param = new PNGDecodeParam();
                        param.setExpandPalette(true);
                       
                        if (raw)
                            param.setPerformGammaCorrection(false);
                        else {
                            param.setPerformGammaCorrection(true);
                            param.setDisplayExponent(2.2f); // sRGB gamma
                        }
                        CachableRed cr = new PNGRed(is, param);
                        cr = new Any2sRGBRed(cr);
                        filt = new RedRable(cr);
                    } catch (IOException ioe) {
View Full Code Here

Examples of org.apache.batik.ext.awt.image.codec.PNGDecodeParam

        Thread t = new Thread() {
                public void run() {
                    Filter filt;
                    try {
                        PNGDecodeParam param = new PNGDecodeParam();
                        param.setExpandPalette(true);
                       
                        if (raw)
                            param.setPerformGammaCorrection(false);
                        else {
                            param.setPerformGammaCorrection(true);
                            param.setDisplayExponent(2.4f); // sRGB gamma
                        }
                        CachableRed cr = new PNGRed(is, param);
                        cr = new Any2sRGBRed(cr);
                        filt = new RedRable(cr);
View Full Code Here

Examples of org.apache.batik.ext.awt.image.codec.PNGDecodeParam

        Thread t = new Thread() {
                public void run() {
                    Filter filt;
                    try {
                        PNGDecodeParam param = new PNGDecodeParam();
                        param.setExpandPalette(true);
                       
                        if (raw)
                            param.setPerformGammaCorrection(false);
                        else {
                            param.setPerformGammaCorrection(true);
                            param.setDisplayExponent(2.4f); // sRGB gamma
                        }
                        CachableRed cr = new PNGRed(is, param);
                        cr = new Any2sRGBRed(cr);
                        filt = new RedRable(cr);
                    } catch (IOException ioe) {
View Full Code Here

Examples of org.apache.batik.ext.awt.image.codec.PNGDecodeParam

        Thread t = new Thread() {
                public void run() {
                    Filter filt;
                    try {
                        PNGDecodeParam param = new PNGDecodeParam();
                        param.setExpandPalette(true);
                       
                        if (raw)
                            param.setPerformGammaCorrection(false);
                        else {
                            param.setPerformGammaCorrection(true);
                            param.setDisplayExponent(2.2f); // sRGB gamma
                        }
                        CachableRed cr = new PNGRed(is, param);
                        dr.setBounds(new Rectangle2D.Double
                                     (0, 0, cr.getWidth(), cr.getHeight()));
View Full Code Here

Examples of org.apache.batik.ext.awt.image.codec.PNGDecodeParam

        Thread t = new Thread() {
                public void run() {
                    Filter filt;
                    try {
                        PNGDecodeParam param = new PNGDecodeParam();
                        param.setExpandPalette(true);
                       
                        if (raw)
                            param.setPerformGammaCorrection(false);
                        else {
                            param.setPerformGammaCorrection(true);
                            param.setDisplayExponent(2.2f); // sRGB gamma
                        }
                        CachableRed cr = new PNGRed(is, param);
                        cr = new Any2sRGBRed(cr);
                        filt = new RedRable(cr);
                    } catch (IOException ioe) {
View Full Code Here

Examples of org.apache.batik.ext.awt.image.codec.PNGDecodeParam

        Thread t = new Thread() {
                public void run() {
                    Filter filt;
                    try {
                        PNGDecodeParam param = new PNGDecodeParam();
                        param.setExpandPalette(true);
                       
                        if (raw)
                            param.setPerformGammaCorrection(false);
                        else {
                            param.setPerformGammaCorrection(true);
                            param.setDisplayExponent(2.2f); // sRGB gamma
                        }
                        CachableRed cr = new PNGRed(is, param);
                        dr.setBounds(new Rectangle2D.Double
                                     (0, 0, cr.getWidth(), cr.getHeight()));
View Full Code Here

Examples of org.apache.batik.ext.awt.image.codec.PNGDecodeParam

    /**
     * @see org.apache.fop.image.BatikImage#decodeImage(org.apache.batik.ext.awt.image.codec.SeekableStream)
     */
    protected CachableRed decodeImage(SeekableStream stream) throws IOException {
        PNGDecodeParam param = new PNGDecodeParam();
        param.setPerformGammaCorrection(true);
        param.setDisplayExponent(2.2f); // sRGB gamma
        PNGRed red = new PNGRed(stream, param);
        String unit = (String)red.getProperty("pixel_units");
        if ("Meters".equals(unit)) {
            this.dpiHorizontal = ((Integer)red.getProperty("x_pixels_per_unit")).intValue()
                * 25.4f / 1000f;
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.