Image.Save Method
.NET Framework 4
Saves this image to the specified stream in the specified format.
This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.
| Name | Description | |
|---|---|---|
|
Save(String) | Saves this Image to the specified file or stream. |
|
Save(Stream, ImageFormat) | Saves this image to the specified stream in the specified format. |
|
Save(String, ImageFormat) | Saves this Image to the specified file in the specified format. |
|
Save(Stream, ImageCodecInfo, EncoderParameters) | Saves this image to the specified stream, with the specified encoder and image encoder parameters. |
|
Save(String, ImageCodecInfo, EncoderParameters) | Saves this Image to the specified file, with the specified encoder and image-encoder parameters. |
BUG: Save method does not always preserve resolution
BUG: Depending on the image format chose, the Save method does not always preserve HorizontalResolution and VerticalResolution. For some applications (namely handling scanned documents) these parameters are very important. This is a real pain for writing image manipulation programs in GDI+.
I have seen this when saving TIFF with LZW compression. This is a new bug in Windows 7 - it worked fine in XP and Vista.
Our workaround is to use ImageMagick to reset the resolution in the saved file after saving it.
I have seen this when saving TIFF with LZW compression. This is a new bug in Windows 7 - it worked fine in XP and Vista.
Our workaround is to use ImageMagick to reset the resolution in the saved file after saving it.
- 1/12/2011
- Benhaha