I have a form that has 18 small TImageENDBView objects. When I load the form, I'm loading each object with a photo from teh database, then assigning the graphic to the screen object.
Some of our users save multi-megabyte JPEG images. Loading 18 of those - we sometimes end up with an out-of-memory error.
Is there a way to change the quality and have it Load abide by that setting?
Both MyPic and ImageBuffer are TImageEnDBView objects. ImageBuffer is tied directly to the ADODataSet query, and the other is just on the screen, not tied to a database.
MyPic.IO.bitmap.assign( // Copy picture from image buffer ImageBuffer.IO.bitmap); // component to gallery component
For thumbnails, try setting TIOJPEGScale to ioJPEG_HALF, ioJPEG_QUARTER or ioJPEG_EIGHTH.
ioJPEG_EIGHTH will load nearly 8 times faster and only use 12.5% of the memory of the full image. If the images are multi-megabyte the reduced quality shouldn't be apparent.