By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,333 Members | 1,850 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,333 IT Pros & Developers. It's quick & easy.

Create image thumbnail without opening complete image

P: n/a
Hi all,
I have a directory full of images (most over 2MB in size) I was to show
each image as a thumbnail on a form, however in order to create a thumbnail I
have to open the complete image then scale it down. This is quite slow,
since there is a lot of file IO going on, what I want to be able to do is
open the image in the scaled down size so that I miss out the step of opening
the file then dowsizing it. I have not been able to find any way to do this
using .NET, possibly it is some Win32 API call, does anyone know?

If you look in Windows Explorer in thumbnail view it shows a thumbnail for
all the images in a directory lightening fast, there must be some Win32
method that can produce thumb size images without reading the whole file -
how can I be this fast using .Net?

Thanks
Mark

Nov 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Mark,

In order to do this, you will want to use the IExtractImage interface on
the shell item (through COM interop). Here is a link to an old post on
google where I link to how to do this (watch for line wrap):

http://groups.google.com/group/micro...c571f730e13a25

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mark R. Dawson" <Ma*********@discussions.microsoft.com> wrote in message
news:27**********************************@microsof t.com...
Hi all,
I have a directory full of images (most over 2MB in size) I was to show
each image as a thumbnail on a form, however in order to create a
thumbnail I
have to open the complete image then scale it down. This is quite slow,
since there is a lot of file IO going on, what I want to be able to do is
open the image in the scaled down size so that I miss out the step of
opening
the file then dowsizing it. I have not been able to find any way to do
this
using .NET, possibly it is some Win32 API call, does anyone know?

If you look in Windows Explorer in thumbnail view it shows a thumbnail for
all the images in a directory lightening fast, there must be some Win32
method that can produce thumb size images without reading the whole file -
how can I be this fast using .Net?

Thanks
Mark

Nov 17 '05 #2

P: n/a
Using IExtractImage will provide a speed advantage only if thumbnails are
already generated and cached.

If not, then it is not possible to generate a thumbnail without having to
read the whole image file.

----------------
-Atul, Sky Software http://www.ssware.com
Shell MegaPack For .Net & ActiveX
Windows Explorer GUI Controls
&
Quick-Launch Like Appbars, MSN/Office2003 Style Popups,
System Tray Icons and Shortcuts/Internet Shortcuts
----------------

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:%2****************@TK2MSFTNGP12.phx.gbl...
Mark,

In order to do this, you will want to use the IExtractImage interface
on the shell item (through COM interop). Here is a link to an old post on
google where I link to how to do this (watch for line wrap):

http://groups.google.com/group/micro...c571f730e13a25

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mark R. Dawson" <Ma*********@discussions.microsoft.com> wrote in message
news:27**********************************@microsof t.com...
Hi all,
I have a directory full of images (most over 2MB in size) I was to
show
each image as a thumbnail on a form, however in order to create a
thumbnail I
have to open the complete image then scale it down. This is quite slow,
since there is a lot of file IO going on, what I want to be able to do is
open the image in the scaled down size so that I miss out the step of
opening
the file then dowsizing it. I have not been able to find any way to do
this
using .NET, possibly it is some Win32 API call, does anyone know?

If you look in Windows Explorer in thumbnail view it shows a thumbnail
for
all the images in a directory lightening fast, there must be some Win32
method that can produce thumb size images without reading the whole
file -
how can I be this fast using .Net?

Thanks
Mark


Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.