PC Review


Reply
Thread Tools Rate Thread

Create image thumbnail without opening complete image

 
 
=?Utf-8?B?TWFyayBSLiBEYXdzb24=?=
Guest
Posts: n/a
 
      18th Oct 2005
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

 
Reply With Quote
 
 
 
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      18th Oct 2005
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]
- (E-Mail Removed)

"Mark R. Dawson" <(E-Mail Removed)> wrote in message
news:27522485-C463-411A-895B-(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
Atul
Guest
Posts: n/a
 
      18th Oct 2005
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]" <(E-Mail Removed)> wrote in
message news:%(E-Mail Removed)...
> 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]
> - (E-Mail Removed)
>
> "Mark R. Dawson" <(E-Mail Removed)> wrote in message
> news:27522485-C463-411A-895B-(E-Mail Removed)...
>> 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
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Thumbnail opening to image in popup screen LG Microsoft Frontpage 5 16th Jan 2008 02:53 PM
save uploaded image thumbnail to sql db image field dodgeyb Microsoft ASP .NET 1 14th Dec 2007 04:29 PM
How to automatically create a thumbnail of a published chart/image rob.manger@gmail.com Microsoft Excel Charting 0 25th Aug 2006 08:39 AM
how do I create a large image from a thumbnail in front page =?Utf-8?B?Z2F6Y2xhcms=?= Microsoft Frontpage 1 22nd Aug 2005 10:06 PM
Create a thumbnail from a remote image Mike Microsoft C# .NET 3 11th Apr 2004 11:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:22 AM.