Files
mono/mcs/class/System.Drawing/System.Drawing.Imaging/PNGCodec.cs
T
Vladimir Vukicevic 2a17599938 Note: Some functionality is (temporarily) lost from System.Drawing --
reading bmp files is not yet implemented, and only png files can be
written.  Support for the rest will show up in the next few days.

* gdipFunctions.cs: Added stream delegate helpers for
stream loading/saving on linux

* Image.cs, Bitmap.cs: Converted to call into GDIPlus for
loading/saving image data.

* BitmapData.cs: synced up data structure with libgdiplus

* BmpCodec.cs, JPEGCodec.cs, PNGCodec.cs: Removed codec impls,
left just codecinfo getters; the codecs are in libgdiplus

* ImageCodecInfo.cs: removed encode/decode delegates

svn path=/trunk/mcs/; revision=25083
2004-04-06 09:05:48 +00:00

39 lines
942 B
C#

//
// System.Drawing.Imaging.PNGCodec.cs
//
// Author:
// Alexandre Pigolkine ([email protected])
//
// Codec is declared in libgdiplus
namespace System.Drawing.Imaging
{
internal class PNGCodec
{
internal static ImageCodecInfo CodecInfo {
get {
ImageCodecInfo info = new ImageCodecInfo();
info.Flags =
ImageCodecFlags.Encoder |
ImageCodecFlags.Decoder |
ImageCodecFlags.Builtin |
ImageCodecFlags.SupportBitmap;
info.FormatDescription = "PNG file format";
info.FormatID = System.Drawing.Imaging.ImageFormat.Png.Guid;
info.MimeType = "image/png";
info.Version = 1;
byte[][] signaturePatterns = new byte[1][];
signaturePatterns[0] = new byte[]{0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a};
info.SignaturePatterns = signaturePatterns;
byte[][] signatureMasks = new byte[1][];
signatureMasks[0] = new byte[]{0xff,0xff,0xff,0xff,0xff,0xff};
info.SignatureMasks = signatureMasks;
return info;
}
}
}
}