Board index » delphi » How to store a set of images?

How to store a set of images?

My problem is, that I want to create a undo activity in my prog. The
managing is not a problem, but I don't knwo how I manage a set of maybe 10
or more images. I think TImageList isn't a good idea 'cause it stores the
bitmaps in one large bitmap. Also the bitmaps must have the same format.
This is also a reason why I can't use TImageList (I use different
pixelformats and also different sizes).

Any ideas, or is the only way to use an "array of TBitmap"?

 

Re:How to store a set of images?


Quote
"Sebastian T?pfer" wrote:
> My problem is, that I want to create a undo activity in my prog. The
> managing is not a problem, but I don't knwo how I manage a set of maybe 10
> or more images. I think TImageList isn't a good idea 'cause it stores the
> bitmaps in one large bitmap. Also the bitmaps must have the same format.
> This is also a reason why I can't use TImageList (I use different
> pixelformats and also different sizes).

Lookup TObjectList.  It's like a linked-list for objects.

Re:How to store a set of images?


Use an array of Tmemorystream or Tfilestream : most of image editors store
undos in memory . My program uses disk to store undo data because i want to
use as less ram as i can .

"Sebastian T?pfer" <st_y...@web.de> ha scritto nel messaggio
news:3cc859c1_1@dnews...

Quote
> My problem is, that I want to create a undo activity in my prog. The
> managing is not a problem, but I don't knwo how I manage a set of maybe 10
> or more images. I think TImageList isn't a good idea 'cause it stores the
> bitmaps in one large bitmap. Also the bitmaps must have the same format.
> This is also a reason why I can't use TImageList (I use different
> pixelformats and also different sizes).

> Any ideas, or is the only way to use an "array of TBitmap"?

Re:How to store a set of images?


Sebastian,

Using D3, I would use a TList to hold the images, particularly as it is
easy to arrange the last-in-fist-out structure you need. Consider also
that you might want to restore associated information like file name,
modified status, file type, in which case think about defining a holder
object to parcel up the image and the additional information before
placing the package on the list.

Bob
---
Sent using Virtual Access 5.01 - download your freeware copy now
http://www.atlantic-coast.com/downloads/vasetup.exe

Other Threads