ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Change Quality on Load

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
johnrboren Posted - Oct 15 2012 : 12:22:21
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


JOHN BOREN
2   L A T E S T    R E P L I E S    (Newest First)
johnrboren Posted - Oct 17 2012 : 09:23:14
That worked great! Thank you!

JOHN BOREN
Patrick Quinn Posted - Oct 16 2012 : 02:08:18
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.

It might be simpler to use an ImageEnMView to show the image thumbnails. I posted a snippet of code that will fill one from a database at http://www.imageen.com/ieforum/topic.asp?TOPIC_ID=590

and there is a demo at http://www.imageen.com/demos/Database/DBMView/DBMView.zip

in your samples at /demos/Database/DBMView/DBMView.dpr

regards

Patrick