Loading an Image:加载一幅图像

<script>function StorePage(){d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();}</script>

// This call returns immediately and pixels

// are loaded in background.

// The following 2 lines of code must be

// on the same line

Image image = Toolkit.getDefaultToolkit().getImage(

"image.gif");

//获取一个image图像对象,方法一

// This method ensures that all pixels have

// been loaded before returning.

image = new ImageIcon("image.gif").getImage();

//获取一个image图像对象,方法二

你可能感兴趣的:(C++,c,C#)