Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
mzhao  
#1 Posted : Tuesday, August 9, 2011 12:57:34 PM(UTC)
mzhao

Rank: Advanced Member

Groups: Member
Joined: 9/10/2010(UTC)
Posts: 57

Thanks: 1 times
For ThumbnailListItem in Aurigma.GraphicsMill.WinControls

There are three constructors :ThumbnailListItem(Pidl pidl)

ThumbnailListItem(StandardFolder standardFolder);

ThumbnailListItem(string path);

Can we create a thumbnail image and load it into thumbnail

listItem at run time.

eg: we have image.png who file size is 1 mb. Instead of creating another small thumbnail image file some where in the file system and load it into thumnnaillistItem, we use image.png file to create thumbnail image at run time and load it into thumbnaillistitem but never store the thumbnail image as a permanent file. In this way, we only need to keep one file permanently.

Dmitry.Obukhov  
#2 Posted : Tuesday, August 9, 2011 7:47:02 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello,

Quote:
eg: we have image.png who file size is 1 mb. Instead of creating another small thumbnail image file some where in the file system and load it into thumnnaillistItem, we use image.png file to create thumbnail image at run time and load it into thumbnaillistitem but never store the thumbnail image as a permanent file. In this way, we only need to keep one file permanently.

Yes, it is possible. Please learn information on how to apply ThumbnailListView control to application in this topic, and how to use features of the control in this one.

Edited by user Tuesday, August 9, 2011 7:47:39 PM(UTC)  | Reason: Not specified

Best regards,

Dmitry Obukhov

Technical Support. Aurigma, Inc.

mzhao  
#3 Posted : Wednesday, August 10, 2011 7:23:16 AM(UTC)
mzhao

Rank: Advanced Member

Groups: Member
Joined: 9/10/2010(UTC)
Posts: 57

Thanks: 1 times
Hello, thanks for the response.

After reviewing the suggested links, we have following questions:

For our listed example of image.png of 1 mb size, we need to create a thumbnaillistitem in following way:

ThumbNailListItem("image.png")

If we do it this way, how is the memory size of thumbnail image for this image loaded? is it around 1 mb size?

Or there are other ways such as directly loading thumbnail of image.png into ThumbNailListItem?

Currently this is how we do this:

1. generate a thumbnail of image.png as imagethumbnail.png and store it some where in the file system.

2. create thumbnaillistItem using imagethumbnail.png such as ThumbnailListItem("imagethumbnail.png).

But we feel that our current way is not effecient as 1) there are two files stored: image.png and imagethumbnail.png; 2) a thumbnail need to be generated for every image which we want to use;

If there is a way to use only one image file and also keep the memory usage as a thumbnail image usage size, that is what we are looking for. If this is possible, please provide some samples.

Dmitry.Obukhov  
#4 Posted : Wednesday, August 10, 2011 9:05:11 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello,

I am afraid that using ThumbnailListItem control will not bring expected results for you. This control resizes images (it is required memory also) and then keep created thumbnail. Thus, there are no profits in comparison with the way you use now.

Edited by user Wednesday, August 10, 2011 9:12:49 PM(UTC)  | Reason: Not specified

Best regards,

Dmitry Obukhov

Technical Support. Aurigma, Inc.

mzhao  
#5 Posted : Thursday, August 11, 2011 5:54:48 AM(UTC)
mzhao

Rank: Advanced Member

Groups: Member
Joined: 9/10/2010(UTC)
Posts: 57

Thanks: 1 times
"This control resizes images (it is required memory also) and then keep created thumbnail."

We need this to be clarified.

1. this control resizes the original image and keeps created thumbnail. AND this original image is disposed and the memory used by it is released some where during this thumbnail creating process?

Use our example again.

The original image is image.png. It takes 1 mb size.

ThumbnailListItem control uses it to create a thumbnail and keep it. But the memory space used by image.png is released. So overall, only thumbnail created here is kept and for sure, it takes less memory than the original image: image.png.

If the whole process works in this way, this is what we want as the memory usage is surely reduced and it also saves us from an extra step to generate a thumbnail for memory space saving purpose.

Please clarify.

Dmitry.Obukhov  
#6 Posted : Thursday, August 11, 2011 7:10:44 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello,

Quote:

ThumbnailListItem control uses it to create a thumbnail and keep it. But the memory space used by image.png is released. So overall, only thumbnail created here is kept and for sure, it takes less memory than the original image: image.png.

I checked a simple example locally:

Code:

string FILE_IN = @"C:\temp\1.jpg";
thumbnailListView1.Items.Add(new Aurigma.GraphicsMill.WinControls.ThumbnailListItem(FILE_IN));

I tested different images in FILE_IN (900 Kb, 2.35 Mb and 6.43 Mb), and checked memory usage.

My results has shown that application uses memory which is equal to (or a bit more) 2 Mb for all cases. It is used for resizing process and for keeping thumbnail. The most important profit for you is automatic creating thumbnails. In this case indeed you do not need to keep both images: original one and thumbnail. You also make your own tests to be sure how much memory is used.

If you have additional questions or need some clarification, please feel free to ask.

Best regards,

Dmitry Obukhov

Technical Support. Aurigma, Inc.

mzhao  
#7 Posted : Friday, August 12, 2011 6:25:11 AM(UTC)
mzhao

Rank: Advanced Member

Groups: Member
Joined: 9/10/2010(UTC)
Posts: 57

Thanks: 1 times
We believe that we use it:

1. the memory usage is consistant no matter what is the size of the original file. Most of our image file is over 5-6 mb. This is definitely helpful.

2. It can save us from an extra step to generate an extra thumbnail.

Thank you.

Dmitry.Obukhov  
#8 Posted : Sunday, August 14, 2011 9:26:52 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello,

Glad to hear that this control is helpful for you. If you have any additional questions, please feel free to contact us.

Best regards,

Dmitry Obukhov

Technical Support. Aurigma, Inc.

Users browsing this topic
Guest
Similar Topics
ThumbnailListItem and image loading (Discussions – Graphics Mill)
by mzhao 9/19/2013 4:03:44 PM(UTC)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.