![]() ' Demo program that shows how to generate thumbnails which preserve the aspect ![]() Please feel free to comment and suggest improvements. The thumbnail generation will not tie up the GUI.įurther comments on the code appear inline. Because the generation is being done in the background you can switch between views at will. If you have a lot of files you will see the thumbnails being displayed as they are generated by the background thread. When you run the application you will see the list of files in the specified folder presented in Details view. The variable, Filter, is currently set to ignore all files except jpg, png and gif. ![]() Set this to the fully qualified path of a folder containing image files. The only thing you should have to change in the code is the value of the global variable, Path. Add one column (Name) to the Details display. Add a ListView control and dock it to the bottom of the form. Add a BackgroundWorker control named bgwThumbs. To recreate the project, start with a blank form and add two buttons, btnDetails and btnThumbs. how to generate the thumbnails without tying up the applicationīecause generating thumbnails of images is (I think) of reasonably wide interest I thought I'd write it up as a code snippet.how to preserve the aspect ratio of the original images. ![]() As part of a project to manage my collection of photos, I wanted to add the capability of displaying a series of files as thumbnails. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |