当图片在你的RAM上时,如何在imagelist中添加图片,而不是在你的磁盘中! [英] How to add picture in imagelist when the picture is on your RAM , not in your disk !

查看:107
本文介绍了当图片在你的RAM上时,如何在imagelist中添加图片,而不是在你的磁盘中!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI all



i我试图在c#中编写程序,它在一个图片框中创建一张图片,每次0.5分钟并将其添加到图像列表中!

,但问题是,当我想将图像添加到图像列表中时,图像必须(或者我认为必须是)在磁盘中,但我在图片框中的现有图片在RAM中,我不想保存它在我的dist!

有没有办法将它从我的RAM添加到imagelist而不保存在磁盘中?



抱歉我的糟糕的英语。

HI all

i am trying to write the program in c# that it create a picture in one picturebox evry 0.5 min and add it into imagelist !
but the problem is when i want to add image into imagelist the image must be ( or i think it must be ) in Disk , but my existing picture in picturebox is in RAM , and i do''t want to save it in my dist !
is there any way to add it from my RAM into imagelist without save it in Disk ?

sorry for my bad English .

推荐答案

不,恰恰相反:当您将图像添加到图像列表时,它应该在内存中,而不是在磁盘上。这一点从这里逐步显现:

http://msdn.microsoft.com/en-us/library/system.windows.forms.imagelist.aspx [ ^ ],

https://webmail.thermofisher.com/CookieAuth.dll?GetLogon?curl=Z2F&reason=0&formdir=1 [ ^ ],

http: //msdn.microsoft.com/en-us/library/system.windows.forms.imagelist.imagecollection.aspx [ ^ ],

http://msdn.microsoft.com/en-us/library/fh5d0khx.aspx [ ^ ]。



通过 ImageList property Images 你来到类型 System.Windows.Forms.ImageList.ImageCollection 类型和其方法添加(最后一个链接)。你在哪里看到一个文件?参数类型是 System.Drawing.Image

http://msdn.microsoft.com/en-us/library/system.drawing.image.aspx [ ^ ]。



-SA
No, just the opposite: when you add an image to the image list, it should be in memory, not on disk. This is apparent from here, step by step:
http://msdn.microsoft.com/en-us/library/system.windows.forms.imagelist.aspx[^],
https://webmail.thermofisher.com/CookieAuth.dll?GetLogon?curl=Z2F&reason=0&formdir=1[^],
http://msdn.microsoft.com/en-us/library/system.windows.forms.imagelist.imagecollection.aspx[^],
http://msdn.microsoft.com/en-us/library/fh5d0khx.aspx[^].

Through ImageList property Images you come to the type System.Windows.Forms.ImageList.ImageCollection type and its methods Add (last link). And where do you see a file? The parameter type is System.Drawing.Image:
http://msdn.microsoft.com/en-us/library/system.drawing.image.aspx[^].

—SA


这篇关于当图片在你的RAM上时,如何在imagelist中添加图片,而不是在你的磁盘中!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆