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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? imagedata.java

?? 源碼為Eclipse開源開發(fā)平臺桌面開發(fā)工具SWT的源代碼,
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
/******************************************************************************* * Copyright (c) 2000, 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v10.html *  * Contributors: *     IBM Corporation - initial API and implementation *******************************************************************************/package org.eclipse.swt.graphics;import java.io.*;import org.eclipse.swt.*;import org.eclipse.swt.internal.CloneableCompatibility;/** * Instances of this class are device-independent descriptions * of images. They are typically used as an intermediate format * between loading from or writing to streams and creating an  * <code>Image</code>. * <p> * Note that the public fields <code>x</code>, <code>y</code>,  * <code>disposalMethod</code> and <code>delayTime</code> are * typically only used when the image is in a set of images used * for animation. * </p> * * @see Image * @see ImageLoader */public final class ImageData implements CloneableCompatibility {		/**	 * The width of the image, in pixels.	 */	public int width;	/**	 * The height of the image, in pixels.	 */	public int height;	/**	 * The color depth of the image, in bits per pixel.	 * <p>	 * Note that a depth of 8 or less does not necessarily	 * mean that the image is palette indexed, or	 * conversely that a depth greater than 8 means that	 * the image is direct color.  Check the associated	 * PaletteData's isDirect field for such determinations.	 */	public int depth;	/**	 * The scanline padding.	 * <p>	 * If one scanline of the image is not a multiple of	 * this number, it will be padded with zeros until it is.	 * </p>	 */	public int scanlinePad;	/**	 * The number of bytes per scanline.	 * <p>	 * This is a multiple of the scanline padding.	 * </p>	 */	public int bytesPerLine;	/**	 * The pixel data of the image.	 * <p>	 * Note that for 16 bit depth images the pixel data is stored	 * in least significant byte order; however, for 24bit and	 * 32bit depth images the pixel data is stored in most	 * significant byte order.	 * </p>	 */	public byte[] data;	/**	 * The color table for the image.	 */	public PaletteData palette;	/**	 * The transparent pixel.	 * <p>	 * Pixels with this value are transparent.	 * </p><p>	 * The default is -1 which means 'no transparent pixel'.	 * </p>	 */	public int transparentPixel;	/**	 * An icon-specific field containing the data from the icon mask.	 * <p>	 * This is a 1 bit bitmap stored with the most significant	 * bit first.  The number of bytes per scanline is	 * '((width + 7) / 8 + (maskPad - 1)) / maskPad * maskPad'.	 * </p><p>	 * The default is null which means 'no transparency mask'.	 * </p>	 */	public byte[] maskData;	/**	 * An icon-specific field containing the scanline pad of the mask.	 * <p>	 * If one scanline of the transparency mask is not a	 * multiple of this number, it will be padded with zeros until	 * it is.	 * </p>	 */	public int maskPad;		/**	 * The alpha data of the image.	 * <p>	 * Every pixel can have an <em>alpha blending</em> value that	 * varies from 0, meaning fully transparent, to 255 meaning	 * fully opaque.  The number of bytes per scanline is	 * 'width'.	 * </p>	 */	public byte[] alphaData;		/**	 * The global alpha value to be used for every pixel.	 * <p>	 * If this value is set, the <code>alphaData</code> field	 * is ignored and when the image is rendered each pixel	 * will be blended with the background an amount	 * proportional to this value.	 * </p><p>	 * The default is -1 which means 'no global alpha value'	 * </p>	 */	public int alpha;	/**	 * The type of file from which the image was read.	 * 	 * It is expressed as one of the following values:	 * <dl>	 * <dt><code>IMAGE_BMP</code></dt>	 * <dd>Windows BMP file format, no compression</dd>	 * <dt><code>IMAGE_BMP_RLE</code></dt>	 * <dd>Windows BMP file format, RLE compression if appropriate</dd>	 * <dt><code>IMAGE_GIF</code></dt>	 * <dd>GIF file format</dd>	 * <dt><code>IMAGE_ICO</code></dt>	 * <dd>Windows ICO file format</dd>	 * <dt><code>IMAGE_JPEG</code></dt>	 * <dd>JPEG file format</dd>	 * <dt><code>IMAGE_PNG</code></dt>	 * <dd>PNG file format</dd>	 * </dl>	 */	public int type;	/**	 * The x coordinate of the top left corner of the image	 * within the logical screen (this field corresponds to	 * the GIF89a Image Left Position value).	 */	public int x;	/**	 * The y coordinate of the top left corner of the image	 * within the logical screen (this field corresponds to	 * the GIF89a Image Top Position value).	 */	public int y;	/**	 * A description of how to dispose of the current image	 * before displaying the next.	 * 	 * It is expressed as one of the following values:	 * <dl>	 * <dt><code>DM_UNSPECIFIED</code></dt>	 * <dd>disposal method not specified</dd>	 * <dt><code>DM_FILL_NONE</code></dt>	 * <dd>do nothing - leave the image in place</dd>	 * <dt><code>DM_FILL_BACKGROUND</code></dt>	 * <dd>fill with the background color</dd>	 * <dt><code>DM_FILL_PREVIOUS</code></dt>	 * <dd>restore the previous picture</dd>	 * </dl>	 * (this field corresponds to the GIF89a Disposal Method value)	 */	public int disposalMethod;	/**	 * The time to delay before displaying the next image	 * in an animation (this field corresponds to the GIF89a	 * Delay Time value).	 */	public int delayTime;	/**	 * Arbitrary channel width data to 8-bit conversion table.	 */	static final byte[][] ANY_TO_EIGHT = new byte[9][];	static {		for (int b = 0; b < 9; ++b) {			byte[] data = ANY_TO_EIGHT[b] = new byte[1 << b];			if (b == 0) continue;			int inc = 0;			for (int bit = 0x10000; (bit >>= b) != 0;) inc |= bit;			for (int v = 0, p = 0; v < 0x10000; v+= inc) data[p++] = (byte)(v >> 8);		}	}	static final byte[] ONE_TO_ONE_MAPPING = ANY_TO_EIGHT[8];	/**	 * Scaled 8x8 Bayer dither matrix.	 */	static final int[][] DITHER_MATRIX = {		{ 0xfc0000, 0x7c0000, 0xdc0000, 0x5c0000, 0xf40000, 0x740000, 0xd40000, 0x540000 },		{ 0x3c0000, 0xbc0000, 0x1c0000, 0x9c0000, 0x340000, 0xb40000, 0x140000, 0x940000 },		{ 0xcc0000, 0x4c0000, 0xec0000, 0x6c0000, 0xc40000, 0x440000, 0xe40000, 0x640000 },		{ 0x0c0000, 0x8c0000, 0x2c0000, 0xac0000, 0x040000, 0x840000, 0x240000, 0xa40000 },		{ 0xf00000, 0x700000, 0xd00000, 0x500000, 0xf80000, 0x780000, 0xd80000, 0x580000 },		{ 0x300000, 0xb00000, 0x100000, 0x900000, 0x380000, 0xb80000, 0x180000, 0x980000 },		{ 0xc00000, 0x400000, 0xe00000, 0x600000, 0xc80000, 0x480000, 0xe80000, 0x680000 },		{ 0x000000, 0x800000, 0x200000, 0xa00000, 0x080000, 0x880000, 0x280000, 0xa80000 }	};/** * Constructs a new, empty ImageData with the given width, height, * depth and palette. The data will be initialized to an (all zero) * array of the appropriate size. * * @param width the width of the image * @param height the height of the image * @param depth the depth of the image * @param palette the palette of the image (must not be null) * * @exception IllegalArgumentException <ul> *    <li>ERROR_INVALID_ARGUMENT - if the width or height is negative, or if the depth is not *        	one of 1, 2, 4, 8, 16, 24 or 32</li> *    <li>ERROR_NULL_ARGUMENT - if the palette is null</li> * </ul> */public ImageData(int width, int height, int depth, PaletteData palette) {	this(width, height, depth, palette,		4, null, 0, null,		null, -1, -1, SWT.IMAGE_UNDEFINED,		0, 0, 0, 0);}/** * Constructs a new, empty ImageData with the given width, height, * depth, palette, scanlinePad and data. * * @param width the width of the image * @param height the height of the image * @param depth the depth of the image * @param palette the palette of the image * @param scanlinePad the padding of each line, in bytes * @param data the data of the image * * @exception IllegalArgumentException <ul> *    <li>ERROR_INVALID_ARGUMENT - if the width or height is negative, or if the depth is not *        	one of 1, 2, 4, 8, 16, 24 or 32</li> *    <li>ERROR_NULL_ARGUMENT - if the palette or data is null</li> *    <li>ERROR_CANNOT_BE_ZERO - if the scanlinePad is zero</li> * </ul> */public ImageData(int width, int height, int depth, PaletteData palette, int scanlinePad, byte[] data) {	this(width, height, depth, palette,		scanlinePad, checkData(data), 0, null,		null, -1, -1, SWT.IMAGE_UNDEFINED,		0, 0, 0, 0);}/** * Constructs an <code>ImageData</code> loaded from the specified * input stream. Throws an error if an error occurs while loading * the image, or if the image has an unsupported type. * <p> * This constructor is provided for convenience when loading a single * image only. If the stream contains multiple images, only the first * one will be loaded. To load multiple images, use  * <code>ImageLoader.load()</code>. * </p> * * @param stream the input stream to load the image from (must not be null) * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the stream is null</li> * </ul> * @exception SWTException <ul> *    <li>ERROR_INVALID_IMAGE - if the image file contains invalid data</li> *    <li>ERROR_IO - if an IO error occurs while reading data</li> * </ul> * * @see ImageLoader#load(InputStream) */public ImageData(InputStream stream) {	ImageData[] data = new ImageLoader().load(stream);	if (data.length < 1) SWT.error(SWT.ERROR_INVALID_IMAGE);	ImageData i = data[0];	setAllFields(		i.width,		i.height,		i.depth,		i.scanlinePad,		i.bytesPerLine,		i.data,		i.palette,		i.transparentPixel,		i.maskData,		i.maskPad,		i.alphaData,		i.alpha,		i.type,		i.x,		i.y,		i.disposalMethod,		i.delayTime);}/** * Constructs an <code>ImageData</code> loaded from a file with the * specified name. Throws an error if an error occurs loading the * image, or if the image has an unsupported type. * <p> * This constructor is provided for convenience when loading a single * image only. If the file contains multiple images, only the first * one will be loaded. To load multiple images, use  * <code>ImageLoader.load()</code>. * </p> * * @param filename the name of the file to load the image from (must not be null) * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the file name is null</li> * </ul> * @exception SWTException <ul> *    <li>ERROR_INVALID_IMAGE - if the image file contains invalid data</li> *    <li>ERROR_IO if an IO error occurs while reading data</li> * </ul> */public ImageData(String filename) {	ImageData[] data = new ImageLoader().load(filename);	if (data.length < 1) SWT.error(SWT.ERROR_INVALID_IMAGE);	ImageData i = data[0];	setAllFields(		i.width,		i.height,		i.depth,		i.scanlinePad,		i.bytesPerLine,		i.data,		i.palette,		i.transparentPixel,		i.maskData,		i.maskPad,		i.alphaData,		i.alpha,		i.type,		i.x,		i.y,		i.disposalMethod,		i.delayTime);}/** * Prevents uninitialized instances from being created outside the package. */ImageData() {}/** * Constructs an image data by giving values for all non-computable fields. * <p> * This method is for internal use, and is not described further. * </p> */ImageData(	int width, int height, int depth, PaletteData palette,	int scanlinePad, byte[] data, int maskPad, byte[] maskData,	byte[] alphaData, int alpha, int transparentPixel, int type,	int x, int y, int disposalMethod, int delayTime){	if (palette == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);	if (!(depth == 1 || depth == 2 || depth == 4 || depth == 8		|| depth == 16 || depth == 24 || depth == 32)) {		SWT.error(SWT.ERROR_INVALID_ARGUMENT);	}	if (width <= 0 || height <= 0) {		SWT.error(SWT.ERROR_INVALID_ARGUMENT);	}	if (scanlinePad == 0) SWT.error (SWT.ERROR_CANNOT_BE_ZERO);	int bytesPerLine = (((width * depth + 7) / 8) + (scanlinePad - 1))		/ scanlinePad * scanlinePad;	setAllFields(		width,		height,		depth,		scanlinePad,		bytesPerLine,		data != null ? data : new byte[bytesPerLine * height],		palette,		transparentPixel,		maskData,		maskPad,		alphaData,		alpha,		type,		x,		y,		disposalMethod,		delayTime);}/**

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
黄一区二区三区| 精品一区免费av| 日韩二区三区在线观看| 国产白丝网站精品污在线入口| 91成人免费在线视频| 国产色产综合色产在线视频 | 美女看a上一区| 91丨porny丨最新| 久久久蜜臀国产一区二区| 亚洲第一福利一区| 成人国产视频在线观看| 日韩欧美一区在线| 亚洲综合999| 91香蕉视频黄| 国产精品美女久久福利网站| 精品在线观看免费| 在线成人av网站| 一级精品视频在线观看宜春院| 国产高清亚洲一区| 欧美大片在线观看一区二区| 亚洲成人免费电影| 91啪亚洲精品| 自拍偷拍国产亚洲| 成人激情校园春色| 国产精品麻豆久久久| 国产91精品免费| 久久久久久久久久久久久久久99| 久久99这里只有精品| 日韩免费看网站| 毛片av一区二区| 欧美一级夜夜爽| 日韩av午夜在线观看| 欧美日韩国产不卡| 午夜精品aaa| 欧美高清hd18日本| 日韩精品三区四区| 欧美一区二区三区性视频| 日本视频在线一区| 日韩欧美国产综合一区| 日本不卡一二三区黄网| 日韩精品一区二区三区四区视频| 日本va欧美va精品发布| 日韩视频免费观看高清完整版 | 久久综合九色综合97婷婷女人| 免费欧美在线视频| 久久这里只有精品视频网| 国产呦精品一区二区三区网站| av中文字幕在线不卡| 国产精品久久久一本精品| 91亚洲精品一区二区乱码| 亚洲伦理在线精品| 欧美日韩一区二区三区四区| 美女脱光内衣内裤视频久久网站 | 国产一区二区三区美女| 久久久另类综合| av亚洲精华国产精华精华 | 在线观看欧美黄色| 琪琪一区二区三区| 国产精品无人区| 色哟哟一区二区在线观看| 午夜电影网亚洲视频| 亚洲精品一区二区三区香蕉| 国产成人亚洲综合a∨婷婷图片 | 91久久一区二区| 日韩和欧美一区二区| 国产欧美一区二区三区鸳鸯浴 | 欧美日韩激情一区| 国产一区二区三区| 亚洲蜜臀av乱码久久精品| 7777精品伊人久久久大香线蕉完整版| 日本视频免费一区| 中文字幕一区二区5566日韩| 91.麻豆视频| 成人性色生活片免费看爆迷你毛片| 亚洲欧美日韩综合aⅴ视频| 91精品国产综合久久久蜜臀粉嫩| 成人一级黄色片| 日韩高清在线一区| 亚洲蜜臀av乱码久久精品蜜桃| 欧美大片一区二区| 日本高清不卡aⅴ免费网站| 国内精品国产成人国产三级粉色| 亚洲乱码国产乱码精品精可以看| 久久亚洲欧美国产精品乐播| 在线一区二区三区四区| 国产成人免费在线视频| 日韩精品一区第一页| 中文字幕亚洲欧美在线不卡| 精品国产a毛片| 欧美巨大另类极品videosbest| 99久久99精品久久久久久| 九九**精品视频免费播放| 亚洲va欧美va人人爽午夜| 国产精品久久久久久久裸模| 欧美精品一区二区三区四区| 一本久久a久久免费精品不卡| 秋霞成人午夜伦在线观看| 久久久亚洲精品石原莉奈 | 国产成人鲁色资源国产91色综 | 国产蜜臀97一区二区三区| 国产成人免费av在线| 黑人巨大精品欧美黑白配亚洲| 亚洲免费观看高清完整版在线观看| 欧美成人在线直播| 在线看国产一区二区| 高清shemale亚洲人妖| 日韩一区欧美二区| 日韩二区三区在线观看| 综合久久国产九一剧情麻豆| 欧美电视剧免费观看| 欧美精品乱码久久久久久按摩| 国产成人一区在线| 亚洲精品综合在线| 中文字幕日本乱码精品影院| 久久久午夜精品| 日韩美女一区二区三区四区| 欧美天天综合网| 丁香五精品蜜臀久久久久99网站| 蜜臀久久99精品久久久画质超高清 | 日韩一区有码在线| 日韩午夜激情电影| 3d动漫精品啪啪一区二区竹菊 | 日韩高清国产一区在线| 日韩电影免费在线| 午夜在线成人av| 一区二区三区欧美在线观看| 国产精品久久毛片av大全日韩| 亚洲欧洲av一区二区三区久久| 久久嫩草精品久久久久| 日韩精品一区二区三区视频播放| 欧美日韩国产三级| 欧美日韩卡一卡二| 成人的网站免费观看| 91麻豆国产自产在线观看| 97久久久精品综合88久久| 成年人网站91| www.色精品| 在线免费视频一区二区| 欧美日韩亚洲不卡| 欧美日韩综合不卡| 欧美精品在线一区二区| 777久久久精品| 日本一区二区三区在线观看| 国产欧美日韩卡一| 亚洲国产成人在线| 亚洲啪啪综合av一区二区三区| 亚洲欧美成人一区二区三区| 奇米色一区二区| 国内外成人在线| 国产精品亚洲一区二区三区妖精 | 三级影片在线观看欧美日韩一区二区 | 欧美日韩国产在线观看| 欧美日韩精品一区二区在线播放| 欧美一区二区三区四区高清| 久久网这里都是精品| 国产精品视频你懂的| 亚洲精品国产第一综合99久久 | 亚洲自拍欧美精品| 亚洲国产精品天堂| 国产精品一区二区在线看| 成人污视频在线观看| 欧美日韩一级片在线观看| 日韩欧美在线网站| 欧美激情一区二区三区蜜桃视频| 中文字幕一区二区三区色视频 | 成人免费毛片片v| 色综合天天视频在线观看| 欧美久久久久久久久中文字幕| 欧美经典一区二区三区| 亚洲综合在线观看视频| 日本亚洲欧美天堂免费| 国产精品亚洲视频| 91在线无精精品入口| 欧美va天堂va视频va在线| 亚洲欧洲三级电影| 麻豆一区二区在线| 99精品视频中文字幕| 欧美午夜精品一区二区蜜桃| 亚洲视频图片小说| 美女视频网站黄色亚洲| 91网站最新地址| www一区二区| 亚洲va欧美va人人爽午夜| 色综合久久六月婷婷中文字幕| 欧美成人伊人久久综合网| 亚洲综合视频在线观看| 国产91精品露脸国语对白| 一本到三区不卡视频| 国产精品日韩成人| 免费成人在线视频观看| 日本黄色一区二区| 国产精品视频免费看| 另类小说视频一区二区| 欧美日韩精品三区| 亚洲人精品午夜| 风间由美性色一区二区三区| 欧美一区二区女人| 亚洲超丰满肉感bbw| 欧美日韩在线不卡| 亚洲男人电影天堂|