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

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

?? imgwriterpgx.java

?? jpeg2000算法實現
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
    }                  /**     * Closes the underlying file or netwrok connection to where the     * data is written. Any call to other methods of the class become     * illegal after a call to this one.     *     * @exception IOException If an I/O error occurs.     *     *     * */    public void close() throws IOException {        int i;        // Finish writing the file, writing 0s at the end if the data        // at end has not been written.        if (out.length() != w*h*packBytes+offset) {            // Goto end of file            out.seek(out.length());            // Fill with 0s            for (i = offset+w*h*packBytes-(int)out.length(); i >0; i--) {                out.writeByte(0);            }        }        out.close();        src = null;        out = null;        db = null;    }    /**     * Writes all buffered data to the file or resource.     *     * @exception IOException If an I/O error occurs.     *     *     *     */    public void flush() throws IOException {        // No flush is needed since we use RandomAccessFile        // Get rid of line buffer (is this a good choice?)        buf = null;    }    /**     * Writes the data of the specified area to the file, coordinates     * are relative to the current tile of the source. Before writing,     * the coefficients are limited to the nominal range and packed into     * 1,2 or 4 bytes (according to the bit-depth).     *     * <P> If the data is unisigned, level shifting is applied adding     * 2^(bit depth - 1)     *     * <P>This method may not be called concurrently from different     * threads.     *     * <P>If the data returned from the BlkImgDataSrc source is     * progressive, then it is requested over and over until it is not     * progressive anymore.     *     * @param ulx The horizontal coordinate of the upper-left corner     * of the area to write, relative to the current tile.     *     * @param uly The vertical coordinate of the upper-left corner     * of the area to write, relative to the current tile.     *     * @param width The width of the area to write.     *     * @param height The height of the area to write.     *     * @exception IOException If an I/O error occurs.     *     *     *     *     * */    public void write(int ulx, int uly, int w, int h) throws IOException{        int k,i,j;        int fracbits = fb;     // In local variable for faster access        int tOffx, tOffy;      // Active tile offset in the X and Y direction        // Initialize db        db.ulx = ulx;        db.uly = uly;        db.w = w;        db.h = h;        // Get the current active tile offset        tOffx = src.getULX(c)-            (src.getImgULX()+src.getCompSubsX(c)-1)/src.getCompSubsX(c);        tOffy = src.getULY(c)-            (src.getImgULY()+src.getCompSubsY(c)-1)/src.getCompSubsY(c);        // Check the array size        if (db.data != null && db.data.length < w*h) {            // A new one will be allocated by getInternCompData()            db.data = null;        }        // Request the data and make sure it is not        // progressive        do {            src.getInternCompData(db,c);        } while (db.progressive);        int tmp;        // Check line buffer        if (buf == null || buf.length < packBytes*w) {            buf = new byte[packBytes*w]; // Expand buffer        }        switch(packBytes){        case 1: // Samples packed into 1 byte            // Write line by line            for (i = 0; i < h; i++) {                // Skip to beggining of line in file                out.seek(offset+this.w*(uly+tOffy+i)+ulx+tOffx);                // Write all bytes in the line                if (fracbits == 0) {                    for (k = db.offset+i*db.scanw+w-1, j = w-1; j >= 0; k--) {                        tmp = db.data[k]+levShift;                        buf[j--] = (byte)((tmp < minVal) ? minVal :                                          ((tmp>maxVal)? maxVal: tmp));                    }                }                else {                    for (k = db.offset+i*db.scanw+w-1, j = w-1; j >= 0; k--) {                        tmp = (db.data[k]>>>fracbits)+levShift;                        buf[j--] = (byte)((tmp < minVal) ? minVal :                                          ((tmp>maxVal)? maxVal: tmp));                    }                }                out.write(buf,0,w);            }            break;                    case 2: // Samples packed in to 2 bytes (short)            // Write line by line            for (i = 0; i < h; i++) {                // Skip to beggining of line in file                out.seek(offset+2*(this.w*(uly+tOffy+i)+ulx+tOffx));                // Write all bytes in the line                if (fracbits == 0) {                    for (k = db.offset+i*db.scanw+w-1, j = (w<<1)-1;                         j >= 0; k--) {                        tmp = db.data[k]+levShift;                        tmp = (tmp < minVal) ? minVal :                            ((tmp>maxVal)? maxVal: tmp);                        buf[j--] = (byte)tmp; // no need for 0xFF mask since                                              // truncation will do it already                        buf[j--] = (byte)(tmp>>>8);                    }                }                else {                    for (k = db.offset+i*db.scanw+w-1, j = (w<<1)-1;                         j >= 0; k--) {                        tmp = (db.data[k]>>>fracbits)+levShift;                        tmp = (tmp < minVal) ? minVal :                            ((tmp>maxVal)? maxVal: tmp);                        buf[j--] = (byte)tmp; // no need for 0xFF mask since                                              // truncation will do it already                        buf[j--] = (byte)(tmp>>>8);                    }               }               out.write(buf,0,w<<1);            }            break;        case 4:            // Write line by line            for (i = 0; i < h; i++) {                // Skip to beggining of line in file                out.seek(offset+4*(this.w*(uly+tOffy+i)+ulx+tOffx));                // Write all bytes in the line                if (fracbits == 0) {                    for (k = db.offset+i*db.scanw+w-1, j = (w<<2)-1;                         j >= 0; k--) {                        tmp = db.data[k]+levShift;                        tmp = (tmp < minVal) ? minVal :                            ((tmp>maxVal)? maxVal: tmp);                        buf[j--] = (byte)tmp;        // No need to use 0xFF                        buf[j--] = (byte)(tmp>>>8);  // masks since truncation                        buf[j--] = (byte)(tmp>>>16); // will have already the                        buf[j--] = (byte)(tmp>>>24); // same effect                    }                }                else {                    for (k = db.offset+i*db.scanw+w-1, j = (w<<2)-1;                         j >= 0; k--) {                        tmp = (db.data[k]>>>fracbits)+levShift;                        tmp = (tmp < minVal) ? minVal :                            ((tmp>maxVal)? maxVal: tmp);                        buf[j--] = (byte)tmp;        // No need to use 0xFF                        buf[j--] = (byte)(tmp>>>8);  // masks since truncation                        buf[j--] = (byte)(tmp>>>16); // will have already the                        buf[j--] = (byte)(tmp>>>24); // same effect                    }                }                out.write(buf,0,w<<2);            }            break;        default:            throw new IOException("PGX supports only bit-depth between "+                                  "1 and 31");        }    }        /**     * Writes the source's current tile to the output. The requests of     * data issued to the source BlkImgDataSrc object are done by strips,     * in order to reduce memory usage.     *     * <P>If the data returned from the BlkImgDataSrc source is     * progressive, then it is requested over and over until it is not     * progressive anymore.     *     * @exception IOException If an I/O error occurs.     *     * @see DataBlk     *     *     * */    public void write() throws IOException {        int i;        int tw = src.getCompWidth(c);  // Tile width        int th = src.getCompHeight(c);  // Tile height        // Write in strips        for(i=0; i <th ; i+=DEF_STRIP_HEIGHT){            write(0,i,tw,(th-i < DEF_STRIP_HEIGHT) ? th-i : DEF_STRIP_HEIGHT);        }    }        /**     * Returns a string of information about the object, more than 1     * line long. The information string includes information from the     * underlying RandomAccessFile (its toString() method is called in     * turn).     *     * @return A string of information about the object.     *     *     */    public String toString() {        return "ImgWriterPGX: WxH = " + w + "x" + h + ", Component = "+            c + ", Bit-depth = "+bitDepth + ", signed = "+isSigned +             "\nUnderlying RandomAccessFile:\n" + out.toString();    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线观看精品一区| 国产午夜精品久久久久久免费视| 欧美一级二级三级乱码| 欧美国产乱子伦 | 欧美日韩国产免费| 久久久精品国产免费观看同学| 亚洲一区二区三区自拍| 国产成人免费视频一区| 91精品国产乱| 亚洲综合网站在线观看| 成年人网站91| 26uuu亚洲| 久久精品国产一区二区三| 日本道免费精品一区二区三区| 国产人成亚洲第一网站在线播放| 天堂成人免费av电影一区| 色综合一个色综合亚洲| 亚洲一区二区三区不卡国产欧美| 久久99久久99精品免视看婷婷| 欧美日韩二区三区| 亚洲第一成年网| 色天天综合色天天久久| 中文字幕一区二区三区在线观看| 国产精品综合一区二区| 2020日本不卡一区二区视频| 日av在线不卡| 日韩免费视频一区二区| 日韩精品成人一区二区三区| 欧美性猛交xxxx黑人交| 一区二区三区中文字幕在线观看| www.视频一区| 自拍偷自拍亚洲精品播放| 97se狠狠狠综合亚洲狠狠| 国产精品成人免费精品自在线观看| 国产xxx精品视频大全| 日本一区二区三区视频视频| 国产成a人亚洲| 国产精品青草综合久久久久99| 国产成人福利片| 国产精品热久久久久夜色精品三区| 国产一区二三区| 久久精品人人爽人人爽| www.欧美色图| 一区二区三区欧美日韩| 欧美图区在线视频| 男女视频一区二区| 精品粉嫩aⅴ一区二区三区四区| 看片的网站亚洲| 国产欧美日韩另类视频免费观看| 成人深夜在线观看| 一区二区三区四区高清精品免费观看 | 久久综合成人精品亚洲另类欧美| 国产毛片一区二区| 国产精品美女一区二区在线观看| 91麻豆福利精品推荐| 亚洲一二三区在线观看| 欧美一区二区三区四区高清| 国内精品免费在线观看| 国产精品久久久久久久裸模| 色哟哟国产精品| 久久精品免费观看| 亚洲精品免费在线观看| 91精品蜜臀在线一区尤物| 国产精品一卡二卡在线观看| 亚洲三级小视频| 日韩精品自拍偷拍| 99热国产精品| 奇米色一区二区三区四区| 国产精品色在线观看| 欧美综合久久久| 国产福利不卡视频| 亚洲国产成人av好男人在线观看| 精品日韩在线观看| 色综合久久中文字幕| 狠狠色丁香婷婷综合| 亚洲麻豆国产自偷在线| 欧美r级电影在线观看| 99在线精品视频| 国产美女精品在线| 日本三级韩国三级欧美三级| 国产精品久久久久久久久动漫 | 成人免费精品视频| 亚洲mv大片欧洲mv大片精品| 国产欧美日韩精品在线| 91精品国产欧美一区二区| 99精品久久免费看蜜臀剧情介绍| 日韩av电影免费观看高清完整版| 国产精品美女久久久久久久久| 91精品中文字幕一区二区三区| 99精品久久免费看蜜臀剧情介绍| 国产麻豆精品视频| 免费成人美女在线观看| 亚洲最新视频在线观看| 国产精品剧情在线亚洲| 26uuu欧美| 91精品国产综合久久精品| 色综合激情五月| 91在线视频免费观看| 成人一区二区三区中文字幕| 久久99精品久久只有精品| 日本不卡一区二区| 亚洲国产精品自拍| 一区二区三区精品在线观看| 亚洲欧美二区三区| 中文字幕一区二区三中文字幕| 国产亚洲精品7777| 久久影院午夜片一区| 欧美mv和日韩mv的网站| 欧美mv日韩mv亚洲| 久久综合久久99| 久久欧美中文字幕| 久久久久久亚洲综合| 久久久久99精品一区| xf在线a精品一区二区视频网站| 欧美一级艳片视频免费观看| 91精品国产入口在线| 制服视频三区第一页精品| 51精品视频一区二区三区| 欧美视频在线一区二区三区| 欧洲视频一区二区| 欧美日韩一区二区三区四区| 欧美日韩国产另类一区| 69久久99精品久久久久婷婷| 日韩免费视频一区| 久久一夜天堂av一区二区三区| 国产网红主播福利一区二区| 国产欧美一区二区精品性色超碰| 国产亚洲va综合人人澡精品| 国产精品久久夜| 一区二区三区四区蜜桃| 天堂成人免费av电影一区| 精品一区二区三区在线观看国产 | 99国产精品久久久久久久久久 | 亚洲午夜成aⅴ人片| 天天影视涩香欲综合网| 久草这里只有精品视频| 国产精品一区二区三区四区| 不卡的电视剧免费网站有什么| 在线观看日韩国产| 日韩欧美黄色影院| 亚洲国产精品av| 亚洲国产成人tv| 国产综合一区二区| 91在线国内视频| 日韩欧美你懂的| 亚洲欧美综合网| 视频一区中文字幕| 粉嫩在线一区二区三区视频| 欧洲激情一区二区| 久久综合资源网| 一区二区三区四区在线播放| 日本不卡视频一二三区| 99久久精品国产一区| 欧美精品亚洲一区二区在线播放| 久久午夜免费电影| 亚洲国产一区二区三区青草影视| 美女mm1313爽爽久久久蜜臀| 99精品视频免费在线观看| 日韩亚洲欧美一区| 亚洲卡通动漫在线| 国产伦理精品不卡| 欧美另类z0zxhd电影| 国产精品乱子久久久久| 蜜臀av一级做a爰片久久| aaa欧美色吧激情视频| 久久综合九色综合久久久精品综合 | 日本韩国精品在线| 久久天堂av综合合色蜜桃网| 亚洲午夜精品一区二区三区他趣| 国产一区二区三区免费在线观看| 色噜噜狠狠成人中文综合| 久久亚洲一区二区三区四区| 亚洲国产欧美在线| 99久久夜色精品国产网站| 精品国产乱码久久久久久久久| 一区二区三区美女视频| 北条麻妃国产九九精品视频| 久久亚洲综合色| 精品亚洲aⅴ乱码一区二区三区| 欧美日本国产一区| 亚洲伦理在线精品| 99久久久精品| 国产精品成人网| 成人av电影免费在线播放| 久久久久久久久久久久久久久99| 日韩国产精品久久久久久亚洲| 色综合视频在线观看| 国产精品国产精品国产专区不蜜| 国产呦精品一区二区三区网站| 欧美高清dvd| 日韩精品免费专区| 欧美一区二区三区视频在线| 亚洲国产人成综合网站| 欧美日韩国产另类一区| 亚洲不卡一区二区三区| 欧美日韩免费不卡视频一区二区三区| 中文一区二区完整视频在线观看| 国产精品亚洲一区二区三区妖精| 久久久av毛片精品| 成人动漫一区二区在线|