Category Archives: files

Make multi-image icons from files in C#

The post Make multi-image icon files in C# showed how to create several bitmaps at runtime and then used them to create multi-image icons in C#. This example lets you load multiple saved image files and use them to create … Continue reading

Posted in drawing, files, graphics | Tagged , , , , , , , , , | Leave a comment

Make multi-image icon files in C#

The most interesting thing about icon files is that they can contain several images with different sizes. When a program needs to display the icon, it can pick the size that is appropriate. For example, Windows 10 displays icons in … Continue reading

Posted in drawing, files, graphics | Tagged , , , , , , , , , | 1 Comment

Make bitmap extension methods that resize bitmaps in C#

The post Resize pictures in a directory to specific widths or heights in C# lets you resize all of the pictures in a directory. This example extracts the key method that resizes files and places it in a new Bitmap … Continue reading

Posted in extensions, files, graphics | Tagged , , , , , , , , , , , , , , , , | 2 Comments

Resize pictures in a directory to specific widths or heights in C#

The post Resize pictures in a directory in C# lets you resize all of the pictures in a directory but it only scales the images. This example lets you resize pictures so they have a given width, height, or both. … Continue reading

Posted in files, graphics, image processing | Tagged , , , , , , , , , , , , , , , | 1 Comment

Serialize and deserialize multiple images in files in C#

The example Serialize and deserialize multiple images in C# showed how you can List<Image> into a memory stream and then deserialize stream to recover the images. This example shows how you can similarly serialize a list of images into a … Continue reading

Posted in database, files, serialization | Tagged , , , , , , , , , , , , , | 3 Comments

Serialize and deserialize multiple images in C#

This example shows how you can serialize and deserialize multiple images together in a single serialization. It also talks a bit about database design. (For more information about database design including this issue, see my book, Beginning Database Design Solutions.) … Continue reading

Posted in database, files, serialization | Tagged , , , , , , , , , , , , , | 2 Comments

Save a bitmap showing user drawn line segments in C#

The example Draw, move, and delete line segments in C# lets the user draw line segments, but it doesn’t include a way to save a bitmap showing the result. This example provides the same features as the previous one, plus … Continue reading

Posted in drawing, files, graphics | Tagged , , , , , , , , , , , , , , , , , , , | Leave a comment

Delete files from multiple folders quickly and easily in C#

The example Delete files quickly and easily in C# lets you make a list of files matching a pattern, check the files that you want deleted, and then delete them all quickly. Reader Uldis posted a comment asking how to … Continue reading

Posted in files, system | Tagged , , , , , , , , , , | Leave a comment

Let the user zoom on a picture and draw in C#

The example Let the user zoom on a picture in C# allows the user to zoom in on a picture and draw on it. Unfortunately, it doesn’t handle the drawing properly when the image is scaled. It doesn’t scale the … Continue reading

Posted in drawing, files, graphics, serialization, transformations | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 1 Comment

Use a standard Windows dialog to let the user select folders in C#

The .NET OpenFileDialog and SaveFileDialog are fairly full-featured. They’re a lot like Windows Explorer with some added file selection capabilities thrown in. In contrast, the FolderBrowserDialog is pretty pathetic. It only lets you use a hierarchical tree-like display, doesn’t provide … Continue reading

Posted in API, controls, files | Tagged , , , , , , , , , , , , , , , , | 13 Comments