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

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

?? jpegencoder.java

?? JavaExplorer是一個獨立于平臺的瀏覽器
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
            PutBits -= 8;        }        if (PutBits > 0) {            int c = ((PutBuffer >> 16) & 0xFF);            try {                outStream.write(c);            } catch (IOException e) {                System.out.println("IO Error: " + e.getMessage());            }        }    }    /*    * Initialisation of the Huffman codes for Luminance and Chrominance.    * This code results in the same tables created in the IJG Jpeg-6a    * library.    */    public void initHuf() {        DC_matrix0 = new int[12][2];        DC_matrix1 = new int[12][2];        AC_matrix0 = new int[255][2];        AC_matrix1 = new int[255][2];        DC_matrix = new Object[2];        AC_matrix = new Object[2];        int p;        int l;        int i;        int lastp;        int si;        int code;        int[] huffsize = new int[257];        int[] huffcode = new int[257];        /*        * init of the DC values for the chrominance        * [][0] is the code   [][1] is the number of bit        */        p = 0;        for (l = 1; l <= 16; l++) {            for (i = 1; i <= bitsDCchrominance[l]; i++) {                huffsize[p++] = l;            }        }        huffsize[p] = 0;        lastp = p;        code = 0;        si = huffsize[0];        p = 0;        while (huffsize[p] != 0) {            while (huffsize[p] == si) {                huffcode[p++] = code;                code++;            }            code <<= 1;            si++;        }        for (p = 0; p < lastp; p++) {            DC_matrix1[valDCchrominance[p]][0] = huffcode[p];            DC_matrix1[valDCchrominance[p]][1] = huffsize[p];        }        /*        * Init of the AC hufmann code for the chrominance        * matrix [][][0] is the code & matrix[][][1] is the number of bit needed        */        p = 0;        for (l = 1; l <= 16; l++) {            for (i = 1; i <= bitsACchrominance[l]; i++) {                huffsize[p++] = l;            }        }        huffsize[p] = 0;        lastp = p;        code = 0;        si = huffsize[0];        p = 0;        while (huffsize[p] != 0) {            while (huffsize[p] == si) {                huffcode[p++] = code;                code++;            }            code <<= 1;            si++;        }        for (p = 0; p < lastp; p++) {            AC_matrix1[valACchrominance[p]][0] = huffcode[p];            AC_matrix1[valACchrominance[p]][1] = huffsize[p];        }        /*        * init of the DC values for the luminance        * [][0] is the code   [][1] is the number of bit        */        p = 0;        for (l = 1; l <= 16; l++) {            for (i = 1; i <= bitsDCluminance[l]; i++) {                huffsize[p++] = l;            }        }        huffsize[p] = 0;        lastp = p;        code = 0;        si = huffsize[0];        p = 0;        while (huffsize[p] != 0) {            while (huffsize[p] == si) {                huffcode[p++] = code;                code++;            }            code <<= 1;            si++;        }        for (p = 0; p < lastp; p++) {            DC_matrix0[valDCluminance[p]][0] = huffcode[p];            DC_matrix0[valDCluminance[p]][1] = huffsize[p];        }        /*        * Init of the AC hufmann code for luminance        * matrix [][][0] is the code & matrix[][][1] is the number of bit        */        p = 0;        for (l = 1; l <= 16; l++) {            for (i = 1; i <= bitsACluminance[l]; i++) {                huffsize[p++] = l;            }        }        huffsize[p] = 0;        lastp = p;        code = 0;        si = huffsize[0];        p = 0;        while (huffsize[p] != 0) {            while (huffsize[p] == si) {                huffcode[p++] = code;                code++;            }            code <<= 1;            si++;        }        for (int q = 0; q < lastp; q++) {            AC_matrix0[valACluminance[q]][0] = huffcode[q];            AC_matrix0[valACluminance[q]][1] = huffsize[q];        }        DC_matrix[0] = DC_matrix0;        DC_matrix[1] = DC_matrix1;        AC_matrix[0] = AC_matrix0;        AC_matrix[1] = AC_matrix1;    }}/* * JpegInfo - Given an image, sets default information about it and divides * it into its constituant components, downsizing those that need to be. */class JpegInfo {    String Comment;    public Image imageobj;    public int imageHeight;    public int imageWidth;    public int[] BlockWidth;    public int[] BlockHeight;    // the following are set as the default    public int Precision = 8;    public int NumberOfComponents = 3;    public Object[] Components;    public int[] CompID = { 1, 2, 3 };    public int[] HsampFactor = { 1, 1, 1 };    public int[] VsampFactor = { 1, 1, 1 };    public int[] QtableNumber = { 0, 1, 1 };    public int[] DCtableNumber = { 0, 1, 1 };    public int[] ACtableNumber = { 0, 1, 1 };    public boolean[] lastColumnIsDummy = { false, false, false };    public boolean[] lastRowIsDummy = { false, false, false };    public int Ss = 0;    public int Se = 63;    public int Ah = 0;    public int Al = 0;    public int[] compWidth;    public int[] compHeight;    public int MaxHsampFactor;    public int MaxVsampFactor;    public JpegInfo(Image image) {        Components = new Object[NumberOfComponents];        compWidth = new int[NumberOfComponents];        compHeight = new int[NumberOfComponents];        BlockWidth = new int[NumberOfComponents];        BlockHeight = new int[NumberOfComponents];        imageobj = image;        imageWidth = image.getWidth(null);        imageHeight = image.getHeight(null);        Comment = "JPEG Encoder Copyright 1998, James R. Weeks and BioElectroMech.  ";        getYCCArray();    }    public void setComment(String comment) {        Comment.concat(comment);    }    public String getComment() {        return Comment;    }    /*     * This method creates and fills three arrays, Y, Cb, and Cr using the     * input image.     */    private void getYCCArray() {        int[] values = new int[imageWidth * imageHeight];        int r;        int g;        int b;        int y;        int x;        // In order to minimize the chance that grabPixels will throw an exception        // it may be necessary to grab some pixels every few scanlines and process        // those before going for more.  The time expense may be prohibitive.        // However, for a situation where memory overhead is a concern, this may be        // the only choice.        PixelGrabber grabber = new PixelGrabber(imageobj.getSource(), 0, 0,                imageWidth, imageHeight, values, 0, imageWidth);        MaxHsampFactor = 1;        MaxVsampFactor = 1;        for (y = 0; y < NumberOfComponents; y++) {            MaxHsampFactor = Math.max(MaxHsampFactor, HsampFactor[y]);            MaxVsampFactor = Math.max(MaxVsampFactor, VsampFactor[y]);        }        for (y = 0; y < NumberOfComponents; y++) {            compWidth[y] = ((((imageWidth % 8) != 0)                ? (((int) Math.ceil((double) imageWidth / 8.0)) * 8) : imageWidth) / MaxHsampFactor) * HsampFactor[y];            if (compWidth[y] != ((imageWidth / MaxHsampFactor) * HsampFactor[y])) {                lastColumnIsDummy[y] = true;            }            // results in a multiple of 8 for compWidth            // this will make the rest of the program fail for the unlikely            // event that someone tries to compress an 16 x 16 pixel image            // which would of course be worse than pointless            BlockWidth[y] = (int) Math.ceil((double) compWidth[y] / 8.0);            compHeight[y] = ((((imageHeight % 8) != 0)                ? (((int) Math.ceil((double) imageHeight / 8.0)) * 8)                : imageHeight) / MaxVsampFactor) * VsampFactor[y];            if (compHeight[y] != ((imageHeight / MaxVsampFactor) * VsampFactor[y])) {                lastRowIsDummy[y] = true;            }            BlockHeight[y] = (int) Math.ceil((double) compHeight[y] / 8.0);        }        try {            if (grabber.grabPixels() != true) {                try {                    throw new AWTException("Grabber returned false: " +                        grabber.status());                } catch (Exception e) {                }                ;            }        } catch (InterruptedException e) {        }        ;        float[][] Y = new float[compHeight[0]][compWidth[0]];        float[][] Cr1 = new float[compHeight[0]][compWidth[0]];        float[][] Cb1 = new float[compHeight[0]][compWidth[0]];        float[][] Cb2 = new float[compHeight[1]][compWidth[1]];        float[][] Cr2 = new float[compHeight[2]][compWidth[2]];        int index = 0;        for (y = 0; y < imageHeight; ++y) {            for (x = 0; x < imageWidth; ++x) {                r = ((values[index] >> 16) & 0xff);                g = ((values[index] >> 8) & 0xff);                b = (values[index] & 0xff);                // The following three lines are a more correct color conversion but                // the current conversion technique is sufficient and results in a higher                // compression rate.                //                Y[y][x] = 16 + (float)(0.8588*(0.299 * (float)r + 0.587 * (float)g + 0.114 * (float)b ));                //                Cb1[y][x] = 128 + (float)(0.8784*(-0.16874 * (float)r - 0.33126 * (float)g + 0.5 * (float)b));                //                Cr1[y][x] = 128 + (float)(0.8784*(0.5 * (float)r - 0.41869 * (float)g - 0.08131 * (float)b));                Y[y][x] = (float) (((0.299 * (float) r) + (0.587 * (float) g) +                    (0.114 * (float) b)));                Cb1[y][x] = 128 +                    (float) (((-0.16874 * (float) r) - (0.33126 * (float) g) +                    (0.5 * (float) b)));                Cr1[y][x] = 128 +                    (float) (((0.5 * (float) r) - (0.41869 * (float) g) -                    (0.08131 * (float) b)));                index++;            }        }        // Need a way to set the H and V sample factors before allowing downsampling.        // For now (04/04/98) downsampling must be hard coded.        // Until a better downsampler is implemented, this will not be done.        // Downsampling is currently supported.  The downsampling method here        // is a simple box filter.        Components[0] = Y;        //        Cb2 = DownSample(Cb1, 1);        Components[1] = Cb1;        //        Cr2 = DownSample(Cr1, 2);        Components[2] = Cr1;    }    float[][] DownSample(float[][] C, int comp) {        int inrow;        int incol;        int outrow;        int outcol;        float[][] output;        int temp;        int bias;        inrow = 0;        incol = 0;        output = new float[compHeight[comp]][compWidth[comp]];        for (outrow = 0; outrow < compHeight[comp]; outrow++) {            bias = 1;            for (outcol = 0; outcol < compWidth[comp]; outcol++) {                output[outrow][outcol] = (C[inrow][incol++] +                    C[inrow++][incol--] + C[inrow][incol++] +                    C[inrow--][incol++] + (float) bias) / (float) 4.0;                bias ^= 3;            }            inrow += 2;            incol = 0;        }        return output;    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
五月婷婷欧美视频| 亚洲成人在线观看视频| 欧美一级日韩一级| 欧美日韩小视频| 91黄色激情网站| 色婷婷av一区二区三区大白胸 | 精品奇米国产一区二区三区| 欧美丰满嫩嫩电影| 欧美久久久一区| 欧美艳星brazzers| 欧美三电影在线| 91麻豆精品久久久久蜜臀| 欧美自拍偷拍一区| 欧美日韩国产综合视频在线观看| 在线观看国产91| 欧美精选在线播放| 欧美精品一区二区三区蜜臀 | 国产剧情一区在线| 国产精品99久| 色婷婷亚洲综合| 欧美一区二区观看视频| 久久伊99综合婷婷久久伊| 久久久高清一区二区三区| 欧美国产成人在线| 一卡二卡三卡日韩欧美| 美女视频黄 久久| 国产精品一区二区男女羞羞无遮挡| 国产高清久久久久| 色综合天天天天做夜夜夜夜做| 色94色欧美sute亚洲线路二| 欧美一区二区三级| 欧美国产欧美综合| 午夜精品久久久久久久蜜桃app| 免费成人av在线播放| 国产精品系列在线观看| 在线一区二区三区| 日韩精品专区在线影院重磅| 国产欧美中文在线| 日韩成人一级片| 丁香婷婷综合五月| 欧美男男青年gay1069videost| 欧美大片在线观看一区二区| 国产精品久久久久久久久久免费看| 亚洲一二三级电影| 丁香婷婷深情五月亚洲| 91精品一区二区三区在线观看| 国产欧美日韩在线看| 午夜久久久影院| 97超碰欧美中文字幕| 精品国产91乱码一区二区三区 | 亚洲综合区在线| 国产在线看一区| 欧美亚洲免费在线一区| 欧美韩国日本综合| 精品中文av资源站在线观看| 欧洲日韩一区二区三区| 日本一区二区三区四区| 美女视频黄频大全不卡视频在线播放| 91美女视频网站| 国产欧美日韩卡一| 国产在线精品免费| 欧美一区二区成人6969| 午夜精品视频在线观看| 欧美性大战久久久久久久蜜臀| 日本一区二区在线不卡| 激情五月播播久久久精品| 538在线一区二区精品国产| 亚洲免费色视频| 91污片在线观看| 国产精品久久久久久久久免费丝袜| 激情综合亚洲精品| 欧美哺乳videos| 免费不卡在线观看| 日韩欧美在线观看一区二区三区| 亚洲国产欧美在线| 欧美中文字幕亚洲一区二区va在线 | 欧美一级二级在线观看| 亚洲一区二区三区四区的| 欧洲在线/亚洲| 一区二区三区资源| 在线精品国精品国产尤物884a| 亚洲欧美日韩国产手机在线 | 日韩电影在线免费看| 欧美精品久久久久久久多人混战 | 亚洲成人自拍一区| 在线看国产一区| 午夜婷婷国产麻豆精品| 91精品黄色片免费大全| 蜜臀av一区二区在线免费观看| 欧美一区二区三区免费| 国产一区二区三区免费观看| 精品国产成人在线影院| 懂色中文一区二区在线播放| ...av二区三区久久精品| 色综合久久综合| 亚洲动漫第一页| 精品精品欲导航| 成人黄色在线网站| 亚洲激情中文1区| 欧美一区二区三区四区高清| 精品无人码麻豆乱码1区2区| 国产欧美一区二区精品久导航| av在线不卡观看免费观看| 夜夜精品浪潮av一区二区三区| 欧美一区二区三区的| 丁香婷婷综合五月| 亚洲国产cao| 久久一区二区三区国产精品| 成人动漫一区二区在线| 午夜免费欧美电影| 国产精品午夜电影| 欧美色图第一页| 狠狠色2019综合网| 悠悠色在线精品| 久久色.com| 欧美日韩电影在线| 国产超碰在线一区| 午夜精品视频一区| 国产精品日韩成人| 日韩午夜av电影| 91女厕偷拍女厕偷拍高清| 欧美视频在线不卡| 色妹子一区二区| 日韩高清在线电影| 亚洲免费观看高清完整| 色综合久久久久久久久久久| 亚洲电影第三页| 久久久久久久久久久99999| 中文字幕亚洲视频| 国产精品免费观看视频| 国产精品久久久久三级| 亚洲欧美日韩在线| 亚洲精品久久久蜜桃| 亚洲bt欧美bt精品777| 免费xxxx性欧美18vr| 国产一区视频网站| 成年人国产精品| 欧美色精品在线视频| 欧美大片拔萝卜| 亚洲国产精品av| 亚洲精品乱码久久久久久日本蜜臀 | 国产亚洲成aⅴ人片在线观看 | 日韩欧美国产不卡| 久久精品一区二区三区不卡| 国产精品久久久久久久久免费相片 | 一区二区三区日韩精品视频| 亚洲超碰精品一区二区| 久久aⅴ国产欧美74aaa| 成人小视频在线观看| 欧美探花视频资源| 欧美成人一级视频| 亚洲欧美日韩电影| 国产在线一区观看| 色综合 综合色| 欧美大片日本大片免费观看| 国产精品伦理一区二区| 日韩国产一区二| 成人国产精品免费网站| 51午夜精品国产| 国产精品久久99| 久久精品99国产国产精| 99v久久综合狠狠综合久久| 日韩欧美国产小视频| 亚洲天堂精品视频| 国内成人自拍视频| 欧美日韩国产综合视频在线观看| 精品国一区二区三区| 亚洲高清三级视频| av资源网一区| 26uuu亚洲综合色欧美| 亚洲国产欧美日韩另类综合 | 久久久99精品久久| 天天做天天摸天天爽国产一区| 丁香网亚洲国际| 精品国产乱码久久久久久浪潮| 亚洲国产欧美日韩另类综合| 成人不卡免费av| 精品国产亚洲在线| 丝袜亚洲另类欧美综合| 色综合 综合色| 国产精品久久综合| 国产精品18久久久久久久网站| 欧美高清精品3d| 亚洲精品大片www| 91麻豆6部合集magnet| 欧美国产1区2区| 国产91丝袜在线观看| 精品少妇一区二区三区| 日韩综合一区二区| 欧美日韩国产免费一区二区| 亚洲激情av在线| 日本韩国欧美国产| 亚洲欧美乱综合| 94-欧美-setu| 亚洲欧洲日韩在线| 91免费视频网| 亚洲视频香蕉人妖| 99久久精品国产毛片| 国产精品色哟哟网站| 成人av中文字幕|