cosmetic changes
authorAlexandre Pigolkine <pigolkine@mono-cvs.ximian.com>
Wed, 30 Jul 2003 02:25:46 +0000 (02:25 -0000)
committerAlexandre Pigolkine <pigolkine@mono-cvs.ximian.com>
Wed, 30 Jul 2003 02:25:46 +0000 (02:25 -0000)
svn path=/trunk/mcs/; revision=16867

mcs/class/System.Drawing/System.Drawing.Imaging/BmpCodec.cs
mcs/class/System.Drawing/System.Drawing.Imaging/ChangeLog
mcs/class/System.Drawing/System.Drawing.Imaging/JPEGCodec.cs
mcs/class/System.Drawing/System.Drawing.Imaging/PNGCodec.cs
mcs/class/System.Drawing/System.Drawing/impl/wine/Bitmap.cs
mcs/class/System.Drawing/System.Drawing/impl/wine/ChangeLog
mcs/class/System.Drawing/System.Drawing/impl/wine/Image.cs

index 5c5a4dbd4d955b1ab9d42f8d05e2ff6099286cd4..152c467050ded6aa32563676aeece79b2106fb00 100644 (file)
@@ -97,7 +97,7 @@ namespace System.Drawing.Imaging {
                        biWidth = info.Size.Width;
                        biHeight = info.Size.Height;
                        biPlanes = 1;
-                       biBitCount = (short)System.Drawing.Image.GetPixelFormatSize(info.Format);
+                       biBitCount = (short)System.Drawing.Image.GetPixelFormatSize(info.PixelFormat);
                        biCompression = (int)BitmapCompression.BI_RGB;
                        biSizeImage = (int)info.RawImageBytes.Length;
                        biXPelsPerMeter = 0;
@@ -213,7 +213,7 @@ namespace System.Drawing.Imaging {
 
                        switch (bmih.biBitCount) {
                                case 24:
-                               info.Format = PixelFormat.Format24bppRgb;
+                               info.PixelFormat = PixelFormat.Format24bppRgb;
                                if (bmfh.bfOffBits != 0L) stream.Seek (startPosition + bmfh.bfOffBits,SeekOrigin.Begin);
                                if (bmih.biCompression == (uint)BitmapCompression.BI_RGB) {
                                        info.RawImageBytes = new byte[bmih.biSizeImage];
@@ -223,7 +223,7 @@ namespace System.Drawing.Imaging {
                                }
                                break;
                                case 32:
-                               info.Format = PixelFormat.Format32bppArgb;
+                               info.PixelFormat = PixelFormat.Format32bppArgb;
                                if (bmfh.bfOffBits != 0L) stream.Seek (startPosition + bmfh.bfOffBits,SeekOrigin.Begin);
                                if (bmih.biCompression == (uint)BitmapCompression.BI_RGB) {
                                        info.RawImageBytes = new byte[bmih.biSizeImage];
index 9bf448c09046619a4ec792af043ff95cea4d65e2..567bce6f8b4a34a956dceeb214afc6547c2960c8 100644 (file)
@@ -1,3 +1,8 @@
+2003-07-23 Alexandre Pigolkine
+       * JPEGCodec.cs
+       * PNGCodec.cs           
+       * BmpCodec.cs           cosmetic changes
+
 2003-07-22 Alexandre Pigolkine
        * ImageCodecInfo.cs
        * ImageFormat.cs
index f6aad73f32bbed12c842c8ddcec944fd9404973a..32ed75e5f154d37ad6ad5d0774bbfbe6cdeb29af 100644 (file)
@@ -667,19 +667,19 @@ namespace System.Drawing.Imaging
 
                        if (cinfo.OutColorSpace == J_COLOR_SPACE.JCS_RGB) {
                                if (cinfo.QuantizeColors) {
-                                       info.Format = PixelFormat.Format8bppIndexed;
+                                       info.PixelFormat = PixelFormat.Format8bppIndexed;
                                }
                                else {
-                                       info.Format = PixelFormat.Format24bppRgb;
+                                       info.PixelFormat = PixelFormat.Format24bppRgb;
                                }
                        }
                        else {
-                               info.Format = PixelFormat.Format8bppIndexed;
+                               info.PixelFormat = PixelFormat.Format8bppIndexed;
                        }
                        info.Size = new Size(cinfo.OutputWidth,cinfo.OutputHeight);
                        info.Stride = row_width;
                        info.Palette = new ColorPalette(1, cinfo.ColorMap);
-                       info.Format = PixelFormat.Format24bppRgb;
+                       info.PixelFormat = PixelFormat.Format24bppRgb;
                        info.RawImageBytes = new byte[(cinfo.OutputHeight) * row_width];
 
                        JSAMPARRAY outbuf = new JSAMPARRAY(cinfo.Stride);
@@ -704,9 +704,9 @@ namespace System.Drawing.Imaging
 
                internal unsafe bool Encode( Stream stream, InternalImageInfo info) {
                
-                       int bpp = Image.GetPixelFormatSize(info.Format) / 8;
+                       int bpp = Image.GetPixelFormatSize(info.PixelFormat) / 8;
                        if( bpp != 3 && bpp != 4) {
-                               throw new ArgumentException(String.Format("Supplied pixel format is not yet supported: {0}, {1} bpp", info.Format, Image.GetPixelFormatSize(info.Format)));
+                               throw new ArgumentException(String.Format("Supplied pixel format is not yet supported: {0}, {1} bpp", info.PixelFormat, Image.GetPixelFormatSize(info.PixelFormat)));
                        }
 
                        fs = stream;
index ef61ec2eb105cba7817246db6aebb09014bac44d..8580b6e4b8e6a638ac7bdf300503257475455c86 100644 (file)
@@ -260,7 +260,7 @@ namespace System.Drawing.Imaging
                        // FIXME: do a real palette processing
                        //info.Palette = new ColorPalette(1, cinfo.ColorMap);
                        // FIXME: get color information from png info structure
-                       info.Format = PixelFormat.Format24bppRgb;
+                       info.PixelFormat = PixelFormat.Format24bppRgb;
                        info.RawImageBytes = new byte[height * row_width];
                        
                        IntPtr row_data = Marshal.AllocHGlobal (row_width);
@@ -284,9 +284,9 @@ namespace System.Drawing.Imaging
 
                internal unsafe bool Encode( Stream stream, InternalImageInfo info) 
                {
-                       int bpp = Image.GetPixelFormatSize(info.Format) / 8;
+                       int bpp = Image.GetPixelFormatSize(info.PixelFormat) / 8;
                        if( bpp != 3 && bpp != 4) {
-                               throw new ArgumentException(String.Format("Supplied pixel format is not yet supported: {0}, {1} bpp", info.Format, Image.GetPixelFormatSize(info.Format)));
+                               throw new ArgumentException(String.Format("Supplied pixel format is not yet supported: {0}, {1} bpp", info.PixelFormat, Image.GetPixelFormatSize(info.PixelFormat)));
                        }
 
                        fs = stream;
index 798870f13ab8b0dc9f10fb66d3bd162c7a182e59..a307ba33d9210b5fe97d10e3214505e49ad62f6d 100644 (file)
@@ -114,7 +114,7 @@ namespace System.Drawing {
                        void InitFromStream( Stream stream) {
                                InternalImageInfo info = System.Drawing.Image.Decode(stream);
                                if (info != null) {
-                                       createdFrom_ = info;
+                                       sourceImageInfo = info;
                                        IntPtr memDC = Win32.CreateCompatibleDC(IntPtr.Zero);
                                        IntPtr dibBits;
                                        BITMAPINFO_FLAT bmi = new BITMAPINFO_FLAT();
@@ -122,7 +122,7 @@ namespace System.Drawing {
                                        bmi.bmiHeader_biWidth = info.Size.Width;
                                        bmi.bmiHeader_biHeight = info.Size.Height;
                                        bmi.bmiHeader_biPlanes = 1;
-                                       bmi.bmiHeader_biBitCount = (short)System.Drawing.Image.GetPixelFormatSize(info.Format);
+                                       bmi.bmiHeader_biBitCount = (short)System.Drawing.Image.GetPixelFormatSize(info.PixelFormat);
                                        bmi.bmiHeader_biCompression = (int)BitmapCompression.BI_RGB;
                                        bmi.bmiHeader_biSizeImage = (int)info.RawImageBytes.Length;
                                        bmi.bmiHeader_biXPelsPerMeter = 0;
@@ -146,7 +146,7 @@ namespace System.Drawing {
                                        Win32.DeleteDC(memDC);
                                        imageSize_ = info.Size;
                                        imageFormat_ = info.RawFormat;
-                                       pixelFormat_ =  info.Format;
+                                       pixelFormat_ =  info.PixelFormat;
                                }
                        }
                        
index b35bb0abc10bdf3c3c7e0e2e16d2fdc750f9ce5f..67828404771a0ab8a61dbe96e86fa99b8eabf450 100644 (file)
@@ -1,3 +1,7 @@
+2003-07-30 Alexandre Pigolkine
+       * Bitmap.cs 
+       * Image.cs              cosmetic changes
+
 2003-06-29 Alexandre Pigolkine
        * Graphics.cs image drawing
 
index bde740ec9ba179083d93dccd83f2d777cf6c53f2..b984f8c8cd9662731606ff7201d6501d94f9fe2a 100644 (file)
@@ -113,13 +113,13 @@ namespace System.Drawing {
                                throw new NotImplementedException ();
                        }
 
-                       protected InternalImageInfo createdFrom_ = null;
+                       protected InternalImageInfo sourceImageInfo = null;
                        public InternalImageInfo ConvertToInternalImageInfo() {
                                InternalImageInfo result = new InternalImageInfo();
                                IntPtr hTempBitmap = IntPtr.Zero;
                                IntPtr hdc = IntPtr.Zero;
                                result.Size = imageSize_;
-                               result.Format = pixelFormat_;
+                               result.PixelFormat = pixelFormat_;
                                //result.Stride = 
                                if(selectedIntoGraphics_ != null) {
                                        hdc = selectedIntoGraphics_.GetHdc();