Skip to content

Image glitch when loading and immediately rotating a surface. #3463

Closed
@SamuelWyck

Description

@SamuelWyck

WIth pygame-ce 2.5.4 loading an image, immediately rotating it, and then convert_alpha, the surface returned is completely white.

basic_enemy_img = pygame.transform.rotate(pygame.image.load(
    os.path.join("Assets/Enemy_assets", "basic_enemy.png")), 180).convert_alpha()

The code above worked just fine in 2.5.3 but as I said above, in pygame-ce 2.5.4 it returns a completely white surface.
I was able to fix the issue with the code below, (converting the surface before rotating) but I'm pretty sure this behaviour is not intended.

basic_enemy_img = pygame.transform.rotate(pygame.image.load(
    os.path.join("Assets/Enemy_assets", "basic_enemy.png")).convert_alpha(), 180)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugNot working as intendedtransformpygame.transform

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions