소스 검색

fix for indexed format images

Luke Pulverenti 12 년 전
부모
커밋
4f0872c570
1개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 5 5
      MediaBrowser.Controller/Drawing/ImageExtensions.cs

+ 5 - 5
MediaBrowser.Controller/Drawing/ImageExtensions.cs

@@ -73,23 +73,23 @@ namespace MediaBrowser.Controller.Drawing
         {
             // http://msdn.microsoft.com/en-us/library/system.drawing.graphics.fromimage.aspx
 
-            if (format == PixelFormat.Indexed)
+            if ((format & PixelFormat.Indexed) == PixelFormat.Indexed)
             {
                 return false;
             }
-            if (format == PixelFormat.Undefined)
+            if ((format & PixelFormat.Undefined) == PixelFormat.Undefined)
             {
                 return false;
             }
-            if (format == PixelFormat.DontCare)
+            if ((format & PixelFormat.DontCare) == PixelFormat.DontCare)
             {
                 return false;
             }
-            if (format == PixelFormat.Format16bppArgb1555)
+            if ((format & PixelFormat.Format16bppArgb1555) == PixelFormat.Format16bppArgb1555)
             {
                 return false;
             }
-            if (format == PixelFormat.Format16bppGrayScale)
+            if ((format & PixelFormat.Format16bppGrayScale) == PixelFormat.Format16bppGrayScale)
             {
                 return false;
             }