A
Andy
I am currently designing a slideshow application that will loop
through all the images under a specific directory. I.E. a storage
card directory. With the variable number of images that could be
displayed, I have chosen to create a doubly linked list with the
physical path as an property and a place holder for the actual image
itself. The idea is that on load the program recursively spins
through the given directory and all sub directories and loads the
filename into the linked list.
At this point a simple loop loads the first 5 images from the memory
card into their respective position in the linked list. I then fire
off two threads. One thread monitors the current position in the list
and keeps 2 images on each side loaded. The other thread does just
the opposite. It monitors all locations greater than two positions
away from the current position and disposes of any images that it
finds there.
The idea is that when put on a timer, the next images will always be
cached in memory.
Ok, the problem is that the images that I am loading are fairly high
quality. Jpeg images that are 2080x1544 and 24 bpp. These images
store in approx 700k. What I am wanting to do is load the image into
memory, convert it to the size of the pictureBox that the image will
be displayed in and reduce the bits per pixel. I have the code that
reduces the size by the correct percentage and that speeds things up,
but I also need to reduce the bpp. Does anyone have any suggestions
about how to do this?
Thanks.
Andy Steinmann
(e-mail address removed)
through all the images under a specific directory. I.E. a storage
card directory. With the variable number of images that could be
displayed, I have chosen to create a doubly linked list with the
physical path as an property and a place holder for the actual image
itself. The idea is that on load the program recursively spins
through the given directory and all sub directories and loads the
filename into the linked list.
At this point a simple loop loads the first 5 images from the memory
card into their respective position in the linked list. I then fire
off two threads. One thread monitors the current position in the list
and keeps 2 images on each side loaded. The other thread does just
the opposite. It monitors all locations greater than two positions
away from the current position and disposes of any images that it
finds there.
The idea is that when put on a timer, the next images will always be
cached in memory.
Ok, the problem is that the images that I am loading are fairly high
quality. Jpeg images that are 2080x1544 and 24 bpp. These images
store in approx 700k. What I am wanting to do is load the image into
memory, convert it to the size of the pictureBox that the image will
be displayed in and reduce the bits per pixel. I have the code that
reduces the size by the correct percentage and that speeds things up,
but I also need to reduce the bpp. Does anyone have any suggestions
about how to do this?
Thanks.
Andy Steinmann
(e-mail address removed)