Files
mono/mcs/class/System.Drawing/System.Drawing.Imaging/JPEGCodec.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

40 lines
1.0 KiB
C#

//
// System.Drawing.Imaging.JPEGCodec.cs
//
// Author:
// Alexandre Pigolkine ([email protected])
//
// (C) 2002/2003 Ximian, Inc.
// Codec is declared in libgdiplus
namespace System.Drawing.Imaging
{
internal class JPEGCodec
{
internal static ImageCodecInfo CodecInfo {
get {
ImageCodecInfo info = new ImageCodecInfo();
info.Flags =
ImageCodecFlags.Encoder |
ImageCodecFlags.Decoder |
ImageCodecFlags.Builtin |
ImageCodecFlags.SupportBitmap;
info.FormatDescription = "JPEG file format";
info.FormatID = System.Drawing.Imaging.ImageFormat.Jpeg.Guid;
info.MimeType = "image/jpeg";
info.Version = 1;
byte[][] signaturePatterns = new byte[1][];
signaturePatterns[0] = new byte[]{0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10, 0x4a, 0x46, 0x49, 0x46, 0x00};
info.SignaturePatterns = signaturePatterns;
byte[][] signatureMasks = new byte[1][];
signatureMasks[0] = new byte[]{0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff};
info.SignatureMasks = signatureMasks;
return info;
}
}
}
}