DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Tue, 26 Jun 2007 19:43:00 -0700,    posted on: microsoft.public.dotnet.framework.drawing        back       

Thread Index
  1    Tedy Pranolo
          2    Nik Coughlin
          3    Bob Powell [MVP]


How to create a thumbnail without reading the whole jpeg file   
Is there a way to read a jpeg partially to construct a smaller sized
image?
For example if I have a 1000x1000pixel jpeg, i want to read only every
tenth pixel to create a 100x100 preview thumbnail. Is this possible?
I dont want to use the previously created thumbnail in the exif data,
or the thumbnails created by the explorer shell, i want the thumbnail
size to be flexible(could be almost as large as the original the
image) and high quality.

Thanks.
Date:Tue, 26 Jun 2007 19:43:00 -0700   Author:  

Re: How to create a thumbnail without reading the whole jpeg file   
Tedy Pranolo wrote:

> Is there a way to read a jpeg partially to construct a smaller sized
> image?
> For example if I have a 1000x1000pixel jpeg, i want to read only every
> tenth pixel to create a 100x100 preview thumbnail. Is this possible?
> I dont want to use the previously created thumbnail in the exif data,
> or the thumbnails created by the explorer shell, i want the thumbnail
> size to be flexible(could be almost as large as the original the
> image) and high quality.
>
> Thanks.


No, because a jpeg is not stored as a series of pixels, it's stored as an 
encoded byte stream, so there is no "every tenth pixel" to read - to get 
every 10th pixel you have to decode the whole image.
Date:Wed, 27 Jun 2007 14:52:32 +1200   Author:  

Re: How to create a thumbnail without reading the whole jpeg file   
In addition to Nik's comment you may be able to extract a thumbnail from 
the file if it has one. Some cameras put one in for quick display of 
their directories.

See the GetThumbnailImage method.

-- 
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.





Tedy Pranolo wrote:

> Is there a way to read a jpeg partially to construct a smaller sized
> image?
> For example if I have a 1000x1000pixel jpeg, i want to read only every
> tenth pixel to create a 100x100 preview thumbnail. Is this possible?
> I dont want to use the previously created thumbnail in the exif data,
> or the thumbnails created by the explorer shell, i want the thumbnail
> size to be flexible(could be almost as large as the original the
> image) and high quality.
> 
> Thanks.
> 
Date:Wed, 27 Jun 2007 20:48:34 +0200   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us