Save Thumbnail Image to File
-
Hi, folks -- I did a ton of searching today on Google and searched The Code Project's forums but haven't been able to find an answer to this question yet. (Too much noise from related topics, I think.) But I *know* I ran across something on this topic a month ago or so... Anyways, I'm writing an app that allows you to create graphs. So I'd like to create a small thumbnail of the graph and apply it to the File so that when the user is in a folder in Thumbnails view, the user can see a that thumbnail. Can someone point me to an article, blog, or other posting with info on this topic? Many thanks! Anthony
-
Hi, folks -- I did a ton of searching today on Google and searched The Code Project's forums but haven't been able to find an answer to this question yet. (Too much noise from related topics, I think.) But I *know* I ran across something on this topic a month ago or so... Anyways, I'm writing an app that allows you to create graphs. So I'd like to create a small thumbnail of the graph and apply it to the File so that when the user is in a folder in Thumbnails view, the user can see a that thumbnail. Can someone point me to an article, blog, or other posting with info on this topic? Many thanks! Anthony
Hi, See this code Image.GetThumbnailImageAbort myCallback = new Image.GetThumbnailImageAbort(ThumbnailCallback); Image img =Image.FromFile("d:\\tests.bmp"); Image tmpImg=img.GetThumbnailImage(20,20,myCallback,IntPtr.Zero); Image myThumbnail = img.GetThumbnailImage( 40, 40, myCallback, IntPtr.Zero); Upto here it is working fine this.CreateGraphics().DrawImage(myThumbnail, 150, 75); It is not drawing see this
-
Hi, folks -- I did a ton of searching today on Google and searched The Code Project's forums but haven't been able to find an answer to this question yet. (Too much noise from related topics, I think.) But I *know* I ran across something on this topic a month ago or so... Anyways, I'm writing an app that allows you to create graphs. So I'd like to create a small thumbnail of the graph and apply it to the File so that when the user is in a folder in Thumbnails view, the user can see a that thumbnail. Can someone point me to an article, blog, or other posting with info on this topic? Many thanks! Anthony
Just to clarify... I'm not asking how to create a thumbnail of any given image. Fortunately, there are a ton of resources out there on that topic. I'm asking how to apply a "preview thumbnail" to a file so that when the user is browsing through his harddrive, he'll be able to see it without opening the file. For example, create a drawing in Visio and save the file. Now open the folder which contains the saved Visio document. Change the view style for the folder from "Details" (or "List" or whatever) to "Thumbnails". Instead of seeing the Visio file type icon representing the document, you'll actually see a "preview thumbnail" of the first tab's drawing in the folder. Cool! So how can we achieve the same effect? Thanks! Anthony