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

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

?? jpeg.java

?? 一個java操作pdf文件的開發包,很好用的.
?? JAVA
字號:
/* * $Id: Jpeg.java,v 1.33 2002/08/23 08:59: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.InputStream;import java.io.IOException;import java.net.MalformedURLException;import java.net.URL;/** * An <CODE>Jpeg</CODE> is the representation of a graphic element (JPEG) * that has to be inserted into the document * * @see		Element * @see		Image * @see		Gif * @see		Png */public class Jpeg extends Image implements Element {        // public static final membervariables        /** This is a type of marker. */    public static final int NOT_A_MARKER = -1;        /** This is a type of marker. */    public static final int VALID_MARKER = 0;        /** Acceptable Jpeg markers. */    public static final int[] VALID_MARKERS = {0xC0, 0xC1, 0xC2};        /** This is a type of marker. */    public static final int UNSUPPORTED_MARKER = 1;        /** Unsupported Jpeg markers. */    public static final int[] UNSUPPORTED_MARKERS = {0xC3, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCD, 0xCE, 0xCF};        /** This is a type of marker. */    public static final int NOPARAM_MARKER = 2;        /** Jpeg markers without additional parameters. */    public static final int[] NOPARAM_MARKERS = {0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0x01};        public static final int M_APP0 = 0xE0;    public static final int M_APPE = 0xEE;        public static final byte JFIF_ID[] = {0x4A, 0x46, 0x49, 0x46, 0x00};    // Constructors        Jpeg(Image image) {        super(image);    }    /**     * Constructs a <CODE>Jpeg</CODE>-object, using an <VAR>url</VAR>.     *     * @param		url			the <CODE>URL</CODE> where the image can be found     */        public Jpeg(URL url) throws BadElementException, IOException {        super(url);        processParameters();    }        /**     * Constructs a <CODE>Jpeg</CODE>-object, using an <VAR>url</VAR>.     *     * @param		url			the <CODE>URL</CODE> where the image can be found.     * @deprecated	use Image.getInstance(...) to create an Image     */        public Jpeg(URL url, float width, float height) throws BadElementException, IOException {        this(url);        scaledWidth = width;        scaledHeight = height;    }        /**     * Constructs a <CODE>Jpeg</CODE>-object, using a <VAR>filename</VAR>.     *     * @param		filename	a <CODE>String</CODE>-representation of the file that contains the Image.     * @deprecated	use Image.getInstance(...) to create an Image     */        public Jpeg(String filename) throws BadElementException, MalformedURLException, IOException {        this(Image.toURL(filename));    }        /**     * Constructs a <CODE>Jpeg</CODE>-object, using a <VAR>filename</VAR>.     *     * @param		filename	a <CODE>String</CODE>-representation of the file that contains the Image.     * @deprecated	use Image.getInstance(...) to create an Image     */        public Jpeg(String filename, float width, float height) throws BadElementException, MalformedURLException, IOException {        this(Image.toURL(filename), width, height);    }        /**     * Constructs a <CODE>Jpeg</CODE>-object from memory.     *     * @param		img		the memory image     */        public Jpeg(byte[] img) throws BadElementException, IOException {        super((URL)null);        rawData = img;        processParameters();    }        /**     * Constructs a <CODE>Jpeg</CODE>-object from memory.     *     * @param		img			the memory image.     * @param		width		the width you want the image to have     * @param		height		the height you want the image to have     */        public Jpeg(byte[] img, float width, float height) throws BadElementException, IOException {        this(img);        scaledWidth = width;        scaledHeight = height;    }        // private static methods        /**     * Reads a short from the <CODE>InputStream</CODE>.     *     * @param	is		the <CODE>InputStream</CODE>     * @return	an int     */        private static final int getShort(InputStream is) throws IOException {        return (is.read() << 8) + is.read();    }        /**     * Returns a type of marker.     *     * @param	marker      an int     * @return	a type: <VAR>VALID_MARKER</CODE>, <VAR>UNSUPPORTED_MARKER</VAR> or <VAR>NOPARAM_MARKER</VAR>     */        private static final int marker(int marker) {        for (int i = 0; i < VALID_MARKERS.length; i++) {            if (marker == VALID_MARKERS[i]) {                return VALID_MARKER;            }        }        for (int i = 0; i < NOPARAM_MARKERS.length; i++) {            if (marker == NOPARAM_MARKERS[i]) {                return NOPARAM_MARKER;            }        }        for (int i = 0; i < UNSUPPORTED_MARKERS.length; i++) {            if (marker == UNSUPPORTED_MARKERS[i]) {                return UNSUPPORTED_MARKER;            }        }        return NOT_A_MARKER;    }        // private methods        /**     * This method checks if the image is a valid JPEG and processes some parameters.     */        private void processParameters() throws BadElementException, IOException {        type = JPEG;        InputStream is = null;        try {            String errorID;            if (rawData == null){                is = url.openStream();                errorID = url.toString();            }            else{                is = new java.io.ByteArrayInputStream(rawData);                errorID = "Byte array";            }            if (is.read() != 0xFF || is.read() != 0xD8)	{                throw new BadElementException(errorID + " is not a valid JPEG-file.");            }            boolean firstPass = true;            int len;            while (true) {                if (is.read() == 0xFF) {                    int marker = is.read();                    if (firstPass && marker == M_APP0) {                        firstPass = false;                        len = getShort(is);                        if (len < 16) {                            skip(is, len - 2);                            continue;                        }                        byte bcomp[] = new byte[JFIF_ID.length];                        int r = is.read(bcomp);                        if (r != bcomp.length)                            throw new BadElementException(errorID + " corrupted JFIF marker.");                        boolean found = true;                        for (int k = 0; k < bcomp.length; ++k) {                            if (bcomp[k] != JFIF_ID[k]) {                                found = false;                                break;                            }                        }                        if (!found) {                            skip(is, len - 2 - bcomp.length);                            continue;                        }                        skip(is, 2);                        int units = is.read();                        int dx = getShort(is);                        int dy = getShort(is);                        if (units == 1) {                            dpiX = dx;                            dpiY = dy;                        }                        else if (units == 2) {                            dpiX = (int)((float)dx * 2.54f + 0.5f);                            dpiY = (int)((float)dy * 2.54f + 0.5f);                        }                        skip(is, len - 2 - bcomp.length - 7);                        continue;                    }                    if (marker == M_APPE) {                        len = getShort(is);                        byte[] byteappe = new byte[len];                        for (int k = 0; k < len; ++k) {                            byteappe[k] = (byte)is.read();                        }                        if (byteappe.length > 12) {                            String appe = new String(byteappe, 0, 5, "ISO-8859-1");                            if (appe.equals("Adobe")) {                                invert = true;                            }                        }                    }                    firstPass = false;                    int markertype = marker(marker);                    if (markertype == VALID_MARKER) {                        skip(is, 2);                        if (is.read() != 0x08) {                            throw new BadElementException(errorID + " must have 8 bits per component.");                        }                        scaledHeight = getShort(is);                        setTop(scaledHeight);                        scaledWidth = getShort(is);                        setRight(scaledWidth);                        colorspace = is.read();                        break;                    }                    else if (markertype == UNSUPPORTED_MARKER) {                        throw new BadElementException(errorID + ": unsupported JPEG marker: " + marker);                    }                    else if (markertype != NOPARAM_MARKER) {                        skip(is, getShort(is) - 2);                    }                }            }        }        finally {            if (is != null) {                is.close();            }            plainWidth = width();            plainHeight = height();        }    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产91综合久久蜜臀| 欧美久久久久久久久| 丝袜美腿一区二区三区| 久久蜜桃香蕉精品一区二区三区| 97精品国产露脸对白| 日本大胆欧美人术艺术动态| 国产精品久久久久久久久免费樱桃 | 欧美私人免费视频| 国内精品在线播放| 亚洲大尺度视频在线观看| 国产精品网站在线观看| 日韩一区二区三区免费观看| 一本久道中文字幕精品亚洲嫩| 久久66热偷产精品| 三级精品在线观看| 亚洲精品伦理在线| 国产精品免费看片| 久久网这里都是精品| 亚洲精品福利视频网站| 久久网这里都是精品| 日韩亚洲欧美一区二区三区| 欧美主播一区二区三区| aaa欧美大片| 国产99一区视频免费| 另类中文字幕网| 日韩精品一区第一页| 伊人一区二区三区| 综合久久久久久久| 国产精品乱码一区二区三区软件 | 日韩一区二区三区观看| 欧美日韩亚洲综合在线 欧美亚洲特黄一级 | 亚洲电影一区二区三区| 综合在线观看色| 国产精品福利一区| 国产精品三级电影| 中文字幕av在线一区二区三区| 久久免费看少妇高潮| 久久久夜色精品亚洲| 2023国产精品| 国产欧美日韩亚州综合 | 欧美在线观看18| 91精品1区2区| 欧美少妇性性性| 欧美精品国产精品| 欧美精品xxxxbbbb| 51精品久久久久久久蜜臀| 337p亚洲精品色噜噜| 91精品国产综合久久蜜臀| 欧美一区二区三区免费视频| 91麻豆精品国产91久久久资源速度 | 久久福利资源站| 精品在线观看免费| 欧美精选在线播放| 91精品国产综合久久蜜臀| 91精品婷婷国产综合久久性色| 欧美精品欧美精品系列| 337p亚洲精品色噜噜噜| 欧美变态tickle挠乳网站| 久久伊99综合婷婷久久伊| 国产日韩欧美高清| 最新国产成人在线观看| 亚洲综合久久久| 蜜臀久久99精品久久久久久9| 精品一区二区综合| 丁香激情综合国产| 欧美性生活影院| 日韩一区二区精品在线观看| 精品国产91久久久久久久妲己| 国产亚洲一区二区在线观看| 中文字幕在线一区免费| 亚洲综合成人在线| 久久精品噜噜噜成人88aⅴ| 国产成人综合在线| 色嗨嗨av一区二区三区| 欧美一区国产二区| 日本一区免费视频| 亚洲一区二区三区免费视频| 看电视剧不卡顿的网站| 国产91丝袜在线播放九色| 色8久久精品久久久久久蜜| 日韩一二三区不卡| 国产精品久久久久久久久晋中| 亚洲国产成人av网| 国产成人av一区二区三区在线| 色婷婷精品久久二区二区蜜臂av | av在线这里只有精品| 欧美色精品天天在线观看视频| 日韩欧美一区中文| 国产精品久线在线观看| 手机精品视频在线观看| 成人免费视频网站在线观看| 欧美日韩一区精品| 中文字幕久久午夜不卡| 视频一区国产视频| 99视频在线观看一区三区| 日韩一区二区电影网| 亚洲婷婷综合久久一本伊一区| 日本免费新一区视频| 97久久精品人人做人人爽| 精品国产乱子伦一区| 亚洲一二三区在线观看| 国产成人99久久亚洲综合精品| 欧美久久一区二区| 亚洲免费电影在线| 国产伦精品一区二区三区免费迷 | 中文字幕av不卡| 蜜桃av一区二区三区| 一本久久a久久精品亚洲| 26uuu久久综合| 亚洲bt欧美bt精品777| 9色porny自拍视频一区二区| 精品福利一二区| 亚洲国产日日夜夜| 色综合一区二区| 久久久久久麻豆| 免费成人在线播放| 欧美日韩中文精品| 亚洲精品高清视频在线观看| 国产不卡一区视频| 精品第一国产综合精品aⅴ| 日韩电影在线观看电影| 欧美在线影院一区二区| 亚洲欧美综合在线精品| 国产91富婆露脸刺激对白| 精品国一区二区三区| 蜜桃视频在线观看一区二区| 欧美日韩视频在线第一区 | 婷婷丁香激情综合| 在线视频亚洲一区| 亚洲图片另类小说| 99天天综合性| 亚洲天天做日日做天天谢日日欢 | 亚洲福利视频三区| 在线精品国精品国产尤物884a| 国产精品嫩草影院av蜜臀| 国产91精品久久久久久久网曝门| 久久综合一区二区| 国产精品一区一区| 国产亚洲成aⅴ人片在线观看| 精品一区二区三区的国产在线播放| 欧美一级艳片视频免费观看| 日本不卡不码高清免费观看| 欧美一区二区高清| 麻豆视频观看网址久久| 欧美tk丨vk视频| 国内精品伊人久久久久影院对白| 精品国产欧美一区二区| 国产精品中文有码| 国产精品色呦呦| 99re成人在线| 亚洲韩国一区二区三区| 欧美日韩不卡在线| 日本网站在线观看一区二区三区 | 91小视频在线免费看| 18欧美乱大交hd1984| 欧美性猛交xxxxxx富婆| 日韩av网站在线观看| 精品国产凹凸成av人导航| 国产一区在线观看麻豆| 欧美经典一区二区三区| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 污片在线观看一区二区| 日韩一级片网址| 国产成人a级片| 夜夜嗨av一区二区三区网页| 欧美三级视频在线| 国产资源精品在线观看| 国产精品久久久久影院色老大 | 成人av免费观看| 国产一区不卡在线| 亚洲日本在线天堂| 6080国产精品一区二区| 国产精品中文有码| 一级特黄大欧美久久久| 欧美大片一区二区三区| 成人a区在线观看| 五月天久久比比资源色| 久久综合久久99| 色屁屁一区二区| 麻豆成人久久精品二区三区红| 国产精品久久久久久久久动漫 | 中文字幕在线一区免费| 在线视频国内一区二区| 久久99精品久久久久婷婷| 中文字幕亚洲欧美在线不卡| 欧美顶级少妇做爰| 不卡的av网站| 久久国产精品99精品国产 | 亚洲人吸女人奶水| 欧美一区二区三区小说| 99热这里都是精品| 麻豆精品一区二区综合av| 亚洲视频你懂的| 欧美精品一区二区三区高清aⅴ| 91免费版在线| 国产精一区二区三区| 午夜精品久久久久久久| 国产精品乱人伦中文| 日韩免费在线观看| 色噜噜狠狠一区二区三区果冻|