• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 691
  • Last Modified:

Thumbnail Viewer

Hi, I'm using VB2010, Winforms. I'm trying to create a Thumbnail Viewer so that I can read the thumbnail from a folder's Thumb.DB file. Has anyone every tried to do that?

If not, is there a way to create an object that will accept a raw image file and produces the image? For example, I'd like to pass to that object the code that makes up an image and have the object (maybe a picture viewer object of some kind) reproduce that image. -- I want to be clear on that I want to pass the "code" that makes up an image and not place an image into a picture box object - that I know how to do. I want to use the actual characters that the image is made of.

Any ideas how this can be done?

Thanks,
Fulano
0
Mr_Fulano
Asked:
Mr_Fulano
  • 3
  • 2
1 Solution
 
käµfm³d 👽Commented:
I want to use the actual characters that the image is made of.

I *think* you mean the "bytes" that the image is made of, not the "characters." I could be wrong. Assuming I'm not, you can load the bytes into a MemoryStream and then pass that stream to one of the Image class' static methods; namely FromStream().

e.g.
using System.IO;

...

byte[] imgData = <some bytes>;
MemoryStream ms = new MemoryStream(imgData);

using (Image img = Image.FromStream(ms))
{
    // Do something with img
}

Open in new window

0
 
Mr_FulanoAuthor Commented:
Hi Kaufmed, yes you are correct. I mean the bytes that make up the image. - Let me play around with this for a while and I'll get back soon.

Thanks,
Fulano
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
Mr_FulanoAuthor Commented:
Hi CodeCruiser, hope all is well. - I looked at your suggested links and think this will get me started. I'll work on my project and if I need more help, I'll post another question. Thanks for the info!

Fulano
0
 
Mr_FulanoAuthor Commented:
Good examples!
0
 
CodeCruiserCommented:
Glad to help :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now