473,419 Members | 1,618 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,419 software developers and data experts.

loading images to ram

Hello...

I am new to C#. My requirement is that, I will receive over 100s of images
from the network to local machine and display these images on an image viewer
one by one on mouse scroll. To improve the performance, I want these images
to reside on the RAM instead of the hard disk. How do I load the images to
the ram and access it to improve my performance.
--
Mohan
Nov 17 '05 #1
3 2211
"=?Utf-8?B?bXJhag==?=" <mo*********@yahoo.com> wrote in
news:96**********************************@microsof t.com:
I am new to C#. My requirement is that, I will receive over 100s of
images from the network to local machine and display these images on
an image viewer one by one on mouse scroll. To improve the
performance, I want these images to reside on the RAM instead of the
hard disk. How do I load the images to the ram and access it to
improve my performance.


Just load them into an image component and cache them. Or if you are doing the drawing directly, you
can store them in byte arrays or streams.

--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Empower ASP.NET with IntraWeb
http://www.atozed.com/IntraWeb/
Nov 17 '05 #2
See the GDI+ FAQ for articles that may help you to understand the
shortcomings of such a scheme.

Images take up a lot of space so uless you're using thumbnails you could be
in for a lot of pain trying to store large amounts of images in RAM.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"mraj" <mo*********@yahoo.com> wrote in message
news:96**********************************@microsof t.com...
Hello...

I am new to C#. My requirement is that, I will receive over 100s of
images
from the network to local machine and display these images on an image
viewer
one by one on mouse scroll. To improve the performance, I want these
images
to reside on the RAM instead of the hard disk. How do I load the images
to
the ram and access it to improve my performance.
--
Mohan

Nov 17 '05 #3
Hi mraj,
As your goal is performance, you must keep an open eye on the number of
images and total size you are going to load in memory first.

If you think you plan it well, you can use the BitMap class to load the
Image from file and you can combine in with MemoryStream object to direct it
in a memory stream of bytes.

Mu advice to not load them all in memory, at least load couples of them and
drop them to get a new couple when user scrolls a page.

Hope that work with you, good luck
--
Ahmed Ghozzy
"mraj" wrote:
Hello...

I am new to C#. My requirement is that, I will receive over 100s of images
from the network to local machine and display these images on an image viewer
one by one on mouse scroll. To improve the performance, I want these images
to reside on the RAM instead of the hard disk. How do I load the images to
the ram and access it to improve my performance.
--
Mohan

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Stacey | last post by:
Hi, I'm hoping for a bit of advise-- I have a (relatively, from the point-of-view of this dilettante) complex script that attempts to preload certain images in order to trigger one of a series of...
4
by: Adrian MacNair | last post by:
Hi, I created an image gallery which displays 63 images in a slideshow. The problem is that the show was slow because each image loaded one at a time during the show. No problem right? I just...
15
by: Geoff Cox | last post by:
Hello I have following type of code in the header function pre_load_pics() { if (document.images) { var image1 = new Image(400,265); image1.scr = "pic1.jpg";
4
by: VR | last post by:
Hi, I am trying to have a menu item (which is an HTML img) to change as a mouse moves over it. So, my code looks something like this: <a onmouseover="ActivateImage('MyImage');"...
2
by: Jean Pierre Daviau | last post by:
When I have something like this in a js file. listeImg = new Array(); listeImg = new Image(w,h); listeImg.src = "centre1.jpg"; etc Are the images loaded after the page is loaded? In the same...
6
by: Ivan Bútora | last post by:
I have recently looked at http://alistapart.com/articles/imagegallery to implement a simple picture gallery on a webpage that I'm working on. Everything works fine; however, I have one question....
0
by: speedcoder | last post by:
hi all, i'm stumped. my applet used to load images over the network. (it was actually designed by someone else.) yes, the applet used to load each image file independently over the network and...
1
by: agatha.life | last post by:
I did a javascript for the loading of images (I didn't want to have the images loaded in "on loading" because they are too many). The website is for a model and if you look at the codeof pages (...
3
jeremydowe
by: jeremydowe | last post by:
Hi, I have noticed that quite a few websites use a preloading graphic (i.e spining circle) to show the that the site is loading images while the user waits. How can I add this to my website? ...
1
by: mlikesit | last post by:
I am trying to get the following code to pre-load some images before re-dirrecting the user. The problem is that the onError event gets called for all of the images immediately. I've tripple...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.