Encoder Parameters and Image Formats

SUMMARY

This chapter covered more advanced imaging concepts. We discussed the System.Drawing.Imaging namespace classes, their members, and how to use them. At the beginning of the chapter you learned how to set grayscale images using SetPixel, LockBits, and UnlockBits. In the same section we discussed how to set the color of a bitmap.

In the section covering the Metafile class and related functionality, you learned the metafile types supported by GDI+, how to create new metafiles, and how to read and enumerate existing metafiles. We also saw how to read metafile header information.

The Graphics class provides methods to set the attributes of images. We covered how to set the colors and other attributes of images using the color map table, color matrix, and color palette. In this section we saw some real-world applications, such as drawing transparent images, wrapping images, and setting gamma values of images.

This chapter also discussed how to use the Encoder, EncoderParameter, EncoderParameters, and ImageCodecInfo classes and their members to encode images. We discussed some real-world scenarios in which you may want to change the color depth and compression of images. We also learned how to read tagged data from TIFF files and how to convert among different image formats.

Chapter 9 will concentrate on the System.Drawing.Drawing2D namespace.

Категории