Commits

aholkner  committed 4c4cf2b

24-bit surface to RGBX with no srccolor

  • Participants
  • Parent commits 98d65b5
  • Branches ctypes-soc

Comments (0)

Files changed (2)

  - pygame.mixer.Channel.get/set_endevent fixed
  - pygame.mixer endevent callback fixed
  - pygame.draw.circle correct box for given radius
+ - 24-bit surface to RGBX string supported if no color key is set
 
 Pygame-ctypes 0.08
 ------------------

File pygame/image.py

             surface.lock()
             result = surf.pixels.to_string()
             surface.unlock()
-    elif surf.format.BytesPerPixel == 3 and format in ('RGBA', 'ARGB'):
+    elif surf.format.BytesPerPixel == 3 and \
+         (format in ('RGBA', 'ARGB') or \
+          format == 'RGBX' and not surf.flags & SDL_SRCCOLORKEY):
         # Optimised conversion from RGB to RGBA or ARGB.
         if surf.format.Rmask == SDL_SwapLE32(0x000000ff) and \
            surf.format.Gmask == SDL_SwapLE32(0x0000ff00) and \