.thm from jpeg
.thm from jpeg
.thm from jpeg
.thm from jpeg
.thm from jpeg
.thm from jpeg .thm from jpeg .thm from jpeg .thm from jpeg .thm from jpeg .thm from jpeg .thm from jpeg .thm from jpeg
.thm from jpeg .thm from jpeg
.thm from jpeg
Go Back  Xtreme Visual Basic Talk > > > .thm from jpeg


Reply
 
Thread Tools Display Modes
  #1  
Old 04-11-2008, 03:51 AM
phil2005 phil2005 is offline
Centurion
 
Join Date: Dec 2004
Posts: 109
Default .thm from jpeg


How can I create a .thm file (image thumbnail) from a jpeg?
Reply With Quote
  #2  
Old 04-11-2008, 08:00 AM
AtmaWeapon's Avatar
AtmaWeapon.thm from jpeg AtmaWeapon is offline
Fabulous Florist

Forum Leader
* Guru *
 
Join Date: Feb 2004
Location: Austin, TX
Posts: 9,500
Default

Use one of the many Graphics.DrawImage overloads to draw the image to a smaller image. There's plenty of examples if you search the forums for resizing images.

Here's the first result for "resize image" restricted to the .NET forums:Bitmap resize.

Had you searched the documentation, you might have found the Image.GetThumbnailImage method, but it's kind of special-purpose. It is optimized for a 120x120 thumbnail, and additionally is expected to be used on images that have embedded thumbnails. This is interesting, but it looks like something done automatically by cameras and it's not really related to your question.
__________________
.NET Resources
My FAQ threads | Tutor's Corner | Code Library
I would bet money 2/3 of .NET questions are already answered in one of these three places.
Reply With Quote
  #3  
Old 04-11-2008, 08:35 AM
phil2005 phil2005 is offline
Centurion
 
Join Date: Dec 2004
Posts: 109
Default

Thanks - and I did search the documentation - but I cannot see how to save as a .thm - System.Drawing.Imaging.ImageFormats do not include .thm and Image.GetThumbnailImage returns a image object which I would still have to save using a System.Drawing.Imaging.ImageFormats (Incidentally, you can set the GetThumbnailImage dimensions to anything you like).
Reply With Quote
  #4  
Old 04-11-2008, 09:34 AM
AtmaWeapon's Avatar
AtmaWeapon.thm from jpeg AtmaWeapon is offline
Fabulous Florist

Forum Leader
* Guru *
 
Join Date: Feb 2004
Location: Austin, TX
Posts: 9,500
Default

I'm unfamiliar with the .thm format; you'll really have to contact the vendor of the software that uses it to be certain how it works. However, this site suggests that if you save a file in the JPEG file format and give it an extension of .thm it might work. I have no idea if this is true or not.

I did notice you can make GetThumbnailImage use whatever size you like, but I mentioned it's optimized for 120x120. In the past, I've seen articles point out that creating the image via Image.Draw can be faster and have higher quality than using GetThumbnailImage for sizes other than 120x120.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
.thm from jpeg
.thm from jpeg
.thm from jpeg .thm from jpeg
.thm from jpeg
.thm from jpeg
.thm from jpeg .thm from jpeg .thm from jpeg .thm from jpeg .thm from jpeg .thm from jpeg .thm from jpeg
.thm from jpeg
.thm from jpeg
 
.thm from jpeg
.thm from jpeg
 
-->