/[Sims3RigEditor]/trunk/gr2lib_typedefs/typeeditors/PixelBytesEditor.cs
ViewVC logotype

Diff of /trunk/gr2lib_typedefs/typeeditors/PixelBytesEditor.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/gr2lib_typedefs/typeeditors/PixelBytesEditor.cs	2010/08/07 02:42:31	48
+++ trunk/gr2lib_typedefs/typeeditors/PixelBytesEditor.cs	2010/08/08 07:43:37	49
@@ -156,20 +156,18 @@
                 {
                     IBaseTextureResource _texture = TextureBinder.CreateNewTexture(_fs.FullPath, out _magic_reader);
 
-                    // do any handling that needs to be done on a per-texture-creator basis
-                    switch (_texture.TextureCreatorType)
-                    {
-                        case TextureCreators.s3tc:
-                            break;
-                        case TextureCreators.bink:
-                            break;
-                        case TextureCreators.raw:
-                            break;
-                        case TextureCreators._default:
-                            break;
-                        default:
-                            throw new InvalidOperationException("Texture is bound to an undefined texture creator.");
-                    }
+                    //// do any handling that needs to be done on a per-texture-creator basis
+                    //switch (_texture.TextureCreatorType)
+                    //{
+                    //    case TextureCreators.s3tc:
+                    //        break;
+                    //    case TextureCreators.bink:
+                    //        break;
+                    //    case TextureCreators._default:
+                    //        break;
+                    //    default:
+                    //        throw new InvalidOperationException("Texture is bound to an undefined texture creator.");
+                    //}
 
 
                     NativeTexture.Encoding = _texture.NativeTextureData.NativeTextureEncoding;
@@ -307,7 +305,7 @@
                                 fixed (byte* ptr = buffer)
                                 {
 
-                                    using (Bitmap image = new Bitmap(NativeTexture.Width, NativeTexture.Height, stride, PixelFormat.Format16bppRgb565, new IntPtr(ptr)))
+                                    using (Bitmap image = new Bitmap(NativeTexture.Width, NativeTexture.Height, stride, PixelFormat.Format32bppArgb, new IntPtr(ptr)))
                                     {
                                         Bitmap output = new Bitmap(image);
                                         output.Save(TextureExporter.FileName);
@@ -324,7 +322,7 @@
                                 fixed (byte* ptr = buffer)
                                 {
 
-                                    using (Bitmap image = new Bitmap(NativeTexture.Width, NativeTexture.Height, stride, PixelFormat.Format16bppRgb565, new IntPtr(ptr)))
+                                    using (Bitmap image = new Bitmap(NativeTexture.Width, NativeTexture.Height, stride, PixelFormat.Format32bppArgb, new IntPtr(ptr)))
                                     {
                                         Bitmap output = new Bitmap(image);
                                         _image_data = output;

 

  ViewVC Help
Powered by ViewVC 1.1.22