亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? image.java

?? iText可以制作中文PDF文件的JAVA源程序最新版下載
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/* * $Id: Image.java,v 1.63 2002/11/19 08:33:32 blowagie Exp $ * $Name:  $ * * Copyright 1999, 2000, 2001, 2002 by Bruno Lowagie. * * The contents of this file are subject to the Mozilla Public License Version 1.1 * (the "License"); you may not use this file except in compliance with the License. * You may obtain a copy of the License at http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the License. * * The Original Code is 'iText, a free JAVA-PDF library'. * * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie. * All Rights Reserved. * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved. * * Contributor(s): all the names of the contributors are added in the source code * where applicable. * * Alternatively, the contents of this file may be used under the terms of the * LGPL license (the "GNU LIBRARY GENERAL PUBLIC LICENSE"), in which case the * provisions of LGPL are applicable instead of those above.  If you wish to * allow use of your version of this file only under the terms of the LGPL * License and not to allow others to use your version of this file under * the MPL, indicate your decision by deleting the provisions above and * replace them with the notice and other provisions required by the LGPL. * If you do not delete the provisions above, a recipient may use your version * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE. * * This library is free software; you can redistribute it and/or modify it * under the terms of the MPL as stated above or under the terms of the GNU * Library General Public License as published by the Free Software Foundation; * either version 2 of the License, or any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more * details. * * If you didn't download this code from the following link, you should check if * you aren't using an obsolete version: * http://www.lowagie.com/iText/ */package com.lowagie.text;import java.io.File;import java.io.InputStream;import java.io.IOException;import java.net.URL;import java.net.MalformedURLException;import java.util.Properties;import java.util.Set;import java.awt.color.ICC_Profile;import com.lowagie.text.pdf.PdfTemplate;import com.lowagie.text.pdf.CCITTG4Encoder;import java.lang.reflect.Constructor;/** * An <CODE>Image</CODE> is the representation of a graphic element (JPEG, PNG or GIF) * that has to be inserted into the document * * @see		Element * @see		Rectangle */public abstract class Image extends Rectangle implements Element, MarkupAttributes {        // static membervariables (concerning the presence of borders)        /** this is a kind of image alignment. */    public static final int DEFAULT = 0;        /** this is a kind of image alignment. */    public static final int RIGHT = 1;        /** this is a kind of image alignment. */    public static final int LEFT = 2;        /** this is a kind of image alignment. */    public static final int MIDDLE = 3;        /** this is a kind of image alignment. */    public static final int TEXTWRAP = 4;        /** this is a kind of image alignment. */    public static final int UNDERLYING = 8;        /** This represents a coordinate in the transformation matrix. */    public static final int AX = 0;        /** This represents a coordinate in the transformation matrix. */    public static final int AY = 1;        /** This represents a coordinate in the transformation matrix. */    public static final int BX = 2;        /** This represents a coordinate in the transformation matrix. */    public static final int BY = 3;        /** This represents a coordinate in the transformation matrix. */    public static final int CX = 4;        /** This represents a coordinate in the transformation matrix. */    public static final int CY = 5;        /** This represents a coordinate in the transformation matrix. */    public static final int DX = 6;        /** This represents a coordinate in the transformation matrix. */    public static final int DY = 7;        // membervariables        /** Adobe invert CMYK JPEG */    protected boolean invert = false;        /** The imagetype. */    protected int type;        /** The URL of the image. */    protected URL url;        /** The raw data of the image. */    protected byte rawData[];        /** The template to be treated as an image. */    protected PdfTemplate template;        /** The alignment of the Image. */    protected int alignment;        /** Text that can be shown instead of the image. */    protected String alt;        /** This is the absolute X-position of the image. */    protected float absoluteX = Float.NaN;        /** This is the absolute Y-position of the image. */    protected float absoluteY = Float.NaN;        /** This is the width of the image without rotation. */    protected float plainWidth;        /** This is the width of the image without rotation. */    protected float plainHeight;        /** This is the scaled width of the image taking rotation into account. */    protected float scaledWidth;        /** This is the original height of the image taking rotation into account. */    protected float scaledHeight;        /** This is the rotation of the image. */    protected float rotation;        /** this is the colorspace of a jpeg-image. */    protected int colorspace = -1;        /** this is the bits per component of the raw image. It also flags a CCITT image.*/    protected int bpc = 1;        /** this is the transparency information of the raw image*/    protected int transparency[];        // serial stamping        protected Long mySerialId = getSerialId();        static long serialId = 0;        /** Holds value of property dpiX. */    protected int dpiX = 0;        /** Holds value of property dpiY. */    protected int dpiY = 0;        protected boolean mask = false;        protected Image imageMask;        protected boolean invertMask = false;        /** Holds value of property interpolation. */    protected boolean interpolation;        /** if the annotation is not null the image will be clickable. */    protected Annotation annotation = null;        /** Contains extra markupAttributes */    protected Properties markupAttributes;        /** ICC Profile attached */    protected ICC_Profile profile = null;        // constructors        /**     * Constructs an <CODE>Image</CODE>-object, using an <VAR>url</VAR>.     *     * @param		url			the <CODE>URL</CODE> where the image can be found.     */        public Image(URL url) {        super(0, 0);        this.url = url;        this.alignment = DEFAULT;        rotation = 0;    }        /**     * Constructs an <CODE>Image</CODE>-object, using an <VAR>url</VAR>.     *     * @param		image			another Image object.     */        protected Image(Image image) {        super(image);        this.type = image.type;        this.url = image.url;        this.alignment = image.alignment;        this.alt = image.alt;        this.absoluteX = image.absoluteX;        this.absoluteY = image.absoluteY;        this.plainWidth = image.plainWidth;        this.plainHeight = image.plainHeight;        this.scaledWidth = image.scaledWidth;        this.scaledHeight = image.scaledHeight;        this.rotation = image.rotation;        this.colorspace = image.colorspace;        this.rawData = image.rawData;        this.template = image.template;        this.bpc = image.bpc;        this.transparency = image.transparency;        this.mySerialId = image.mySerialId;        this.invert = image.invert;        this.dpiX = image.dpiX;        this.dpiY = image.dpiY;        this.mask = image.mask;        this.imageMask = image.imageMask;        this.invertMask = image.invertMask;        this.interpolation = image.interpolation;        this.annotation = image.annotation;        this.markupAttributes = image.markupAttributes;        this.profile = image.profile;    }        // gets an instance of an Image        public static Image getInstance(Image image) {        try {            Class cs = image.getClass();            Constructor constructor = cs.getDeclaredConstructor(new Class[]{Image.class});            return (Image)constructor.newInstance(new Object[]{image});        }        catch (Exception e) {            throw new ExceptionConverter(e);        }    }        /**     * Gets an instance of an Image.     *     * @param	url     an URL     * @return	an object of type <CODE>Gif</CODE>, <CODE>Jpeg</CODE> or <CODE>Png</CODE>     */        public static Image getInstance(URL url) throws BadElementException, MalformedURLException, IOException {        InputStream is = null;        try {            is = url.openStream();            int c1 = is.read();            int c2 = is.read();            is.close();                        is = null;            if (c1 == 'G' && c2 == 'I') {                return new Gif(url);            }            if (c1 == 0xFF && c2 == 0xD8) {                return new Jpeg(url);            }            if (c1 == Png.PNGID[0] && c2 == Png.PNGID[1]) {                return new Png(url);            }            if (c1 == 0xD7 && c2 == 0xCD) {                return new ImgWMF(url);            }            throw new IOException(url.toString() + " is not a recognized imageformat.");        }        finally {            if (is != null) {                is.close();            }        }    }        /**     * Gets an instance of an Image from a java.awt.Image.     *     * @param image the <CODE>java.awt.Image</CODE> to convert     * @param color if different from <CODE>null</CODE> the transparency     * pixels are replaced by this color     * @param forceBW if <CODE>true</CODE> the image is treated as black and white     * @return an object of type <CODE>ImgRaw</CODE>     * @throws BadElementException on error     * @throws IOException on error     */        public static Image getInstance(java.awt.Image image, java.awt.Color color, boolean forceBW) throws BadElementException, IOException {        java.awt.image.PixelGrabber pg = new java.awt.image.PixelGrabber(image, 0, 0, -1, -1, true);        try {            pg.grabPixels();        } catch (InterruptedException e) {            throw new IOException("java.awt.Image Interrupted waiting for pixels!");        }        if ((pg.getStatus() & java.awt.image.ImageObserver.ABORT) != 0) {            throw new IOException("java.awt.Image fetch aborted or errored");        }        int w = pg.getWidth();        int h = pg.getHeight();        int[] pixels = (int[])pg.getPixels();        if (forceBW) {            int byteWidth = (w / 8) + ((w & 7) != 0 ? 1 : 0);            byte[] pixelsByte = new byte[byteWidth * h];                        int index = 0;            int size = h * w;            int transColor = 1;            if (color != null) {                transColor = (color.getRed() + color.getGreen() + color.getBlue() < 384) ? 0 : 1;            }            int transparency[] = null;            int cbyte = 0x80;            int wMarker = 0;            int currByte = 0;            if (color != null) {                for (int j = 0; j < size; j++) {                    int alpha = (pixels[j] >> 24) & 0xff;                    if (alpha < 250) {                        if (transColor == 1)                            currByte |= cbyte;                    }                    else {                        if ((pixels[j] & 0x888) != 0)                            currByte |= cbyte;                    }                    cbyte >>= 1;                    if (cbyte == 0 || wMarker + 1 >= w) {                        pixelsByte[index++] = (byte)currByte;                        cbyte = 0x80;                        currByte = 0;                    }                    ++wMarker;                    if (wMarker >= w)                        wMarker = 0;                }            }            else {                for (int j = 0; j < size; j++) {                    if (transparency == null) {                        int alpha = (pixels[j] >> 24) & 0xff;                        if (alpha == 0) {                            transparency = new int[2];                            transparency[0] = transparency[1] = ((pixels[j] & 0x888) != 0) ? 1 : 0;                        }                    }                    if ((pixels[j] & 0x888) != 0)                        currByte |= cbyte;                    cbyte >>= 1;                    if (cbyte == 0 || wMarker + 1 >= w) {                        pixelsByte[index++] = (byte)currByte;                        cbyte = 0x80;                        currByte = 0;                    }                    ++wMarker;                    if (wMarker >= w)                        wMarker = 0;                }            }            return Image.getInstance(w, h, 1, 1, pixelsByte, transparency);        }        else {            byte[] pixelsByte = new byte[w * h * 3];                        int index = 0;            int size = h * w;            int red = 255;            int green = 255;            int blue = 255;            if (color != null) {                red = color.getRed();                green = color.getGreen();                blue = color.getBlue();            }            int transparency[] = null;            if (color != null) {                for (int j = 0; j < size; j++) {                    int alpha = (pixels[j] >> 24) & 0xff;                    if (alpha < 250) {                        pixelsByte[index++] = (byte) red;                        pixelsByte[index++] = (byte) green;                        pixelsByte[index++] = (byte) blue;                    }                    else {                        pixelsByte[index++] = (byte) ((pixels[j] >> 16) & 0xff);                        pixelsByte[index++] = (byte) ((pixels[j] >> 8) & 0xff);                        pixelsByte[index++] = (byte) ((pixels[j]) & 0xff);                    }                }            }            else {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
粉嫩在线一区二区三区视频| 欧美电影在线免费观看| 欧美又粗又大又爽| 国产欧美日本一区视频| 午夜精品爽啪视频| 成人av午夜电影| 精品免费一区二区三区| 午夜久久久影院| 成人av在线电影| 久久久精品综合| 免费在线观看一区| 欧美色综合网站| 国产精品九色蝌蚪自拍| 国产一二三精品| 欧美一区二区高清| 丝袜亚洲另类丝袜在线| 91成人在线观看喷潮| 亚洲视频精选在线| 成人一级片网址| 久久久精品免费免费| 美女在线一区二区| 欧美一区二区视频在线观看2022| 亚洲天堂免费看| eeuss国产一区二区三区| 日韩欧美国产综合| 亚洲成精国产精品女| 欧美色国产精品| 亚洲午夜久久久久中文字幕久| 成人av第一页| 国产精品美女www爽爽爽| 成人性生交大片免费看中文网站| 久久先锋资源网| 国产精品性做久久久久久| 欧美不卡视频一区| 精彩视频一区二区三区| 精品欧美乱码久久久久久1区2区| 久久www免费人成看片高清| 欧美日韩一区小说| 午夜电影久久久| 日韩美女一区二区三区| 另类小说综合欧美亚洲| 欧美不卡视频一区| 国产乱淫av一区二区三区| 久久久高清一区二区三区| 国产成人免费视频精品含羞草妖精| 精品国产欧美一区二区| 国内精品久久久久影院色| 久久久久久久久久看片| 国产成人啪免费观看软件| 欧美激情一区二区三区四区| 波多野结衣亚洲| 亚洲一区视频在线观看视频| 91精品国产综合久久精品app| 麻豆精品国产传媒mv男同| 26uuu亚洲婷婷狠狠天堂| 成人午夜免费av| 夜夜操天天操亚洲| 日韩精品一区二区三区在线观看| 国产主播一区二区| 亚洲色图视频网| 91精品国产福利| 国产白丝网站精品污在线入口| 国产欧美一区二区三区鸳鸯浴| www.成人网.com| 日本视频在线一区| 久久蜜臀中文字幕| 91黄色激情网站| 经典三级一区二区| 亚洲一区二区不卡免费| 日韩精品中午字幕| 99精品国产视频| 久久成人羞羞网站| 亚洲嫩草精品久久| 欧美成人精品1314www| 色婷婷av一区| 国产成人精品综合在线观看| 亚洲一区免费在线观看| 久久久美女艺术照精彩视频福利播放| 色爱区综合激月婷婷| 国产在线精品视频| 亚洲午夜免费电影| 亚洲特级片在线| 久久影院午夜片一区| 欧美日韩一区国产| 99精品国产99久久久久久白柏| 青青草原综合久久大伊人精品优势| 国产精品久久久久影视| 精品乱人伦小说| 6080午夜不卡| 欧美日韩精品欧美日韩精品 | 一区二区欧美在线观看| 欧美成人猛片aaaaaaa| 欧美在线影院一区二区| 国产一区欧美二区| 天天亚洲美女在线视频| 日韩极品在线观看| 国产精品黄色在线观看| 精品成人一区二区三区四区| 5858s免费视频成人| 欧美性三三影院| 色狠狠av一区二区三区| 国产99久久久精品| 日韩中文字幕区一区有砖一区| 亚洲另类在线制服丝袜| 日本一区二区综合亚洲| 国产日韩视频一区二区三区| 精品久久一区二区三区| 欧美精品丝袜久久久中文字幕| 一本大道久久a久久精品综合| 成人黄色小视频| 懂色av中文一区二区三区| 国产乱码精品1区2区3区| 精品一区免费av| 国产综合一区二区| 国内欧美视频一区二区| 国产福利电影一区二区三区| 国产高清在线观看免费不卡| 国产精品香蕉一区二区三区| 国产成人在线免费观看| 成人免费看视频| www.亚洲国产| 在线精品国精品国产尤物884a| 91啪在线观看| 色狠狠桃花综合| 欧美人牲a欧美精品| 日韩视频免费观看高清完整版| 日韩欧美资源站| 亚洲精品在线三区| 中文字幕二三区不卡| 亚洲婷婷综合久久一本伊一区| 亚洲精品乱码久久久久久| 午夜精品久久久久影视| 蜜臀久久99精品久久久画质超高清| 另类小说图片综合网| 国产毛片精品国产一区二区三区| 国产精品一区二区久久精品爱涩 | 欧美三级视频在线| 在线播放91灌醉迷j高跟美女| 欧美一级欧美一级在线播放| 26uuu欧美日本| 亚洲青青青在线视频| 亚洲18女电影在线观看| 激情欧美一区二区| 99久久精品国产麻豆演员表| 欧美视频一区二区在线观看| 欧美一区欧美二区| 国产精品不卡视频| 香蕉影视欧美成人| 国产成人在线视频网址| 在线观看日韩精品| 久久老女人爱爱| 国产精品免费人成网站| 日韩黄色片在线观看| 国产精品小仙女| 91麻豆精品久久久久蜜臀| 久久精品一区二区三区不卡| 一区二区三区精品在线| 久久99精品国产麻豆婷婷| 欧美成人女星排名| 亚洲欧美一区二区三区久本道91 | 夜夜精品浪潮av一区二区三区| 日韩vs国产vs欧美| 99在线热播精品免费| 日韩精品在线看片z| 一区二区三区高清在线| 国产成人精品1024| 欧美一级精品大片| 亚洲欧美日本在线| 狠狠色伊人亚洲综合成人| 欧美日本一区二区三区四区 | 风间由美一区二区三区在线观看| 欧美视频你懂的| 国产精品视频一区二区三区不卡| 亚洲国产一区二区三区| 成人在线综合网| 久久免费午夜影院| 免费成人结看片| 欧美色爱综合网| 亚洲男同性视频| www.欧美.com| 久久精品一区蜜桃臀影院| 老司机一区二区| 7777精品伊人久久久大香线蕉完整版 | 国产精品国产精品国产专区不蜜| 麻豆精品一区二区三区| 91精品国产丝袜白色高跟鞋| 亚洲精品国产第一综合99久久| 国产不卡在线视频| 久久久久久久久久久久久女国产乱 | 北条麻妃一区二区三区| 国产日韩v精品一区二区| 精品无人码麻豆乱码1区2区| 日韩欧美黄色影院| 奇米色一区二区| 日韩午夜在线影院| 日本成人在线电影网| 91精品国产日韩91久久久久久| 亚洲1区2区3区视频| 7777女厕盗摄久久久| 日本成人在线网站|