0

I wanted to use this to display textures on a grid, but i get the message "Cannot find reference 'load' in 'image.py'". Any idea how to fix this?

import pygame

pygame.init()

class dis_img():

size = 32 

    def dis_texture(self, file, size):
        self.bitmap = pygame.image.load(file)
        self.bitmap = pygame.transform.scale(self.bitmap, (size, size))
        self.surf = pygame.Surface((size, size), 
        pygame.HWSURFACE|pygame.SRCALPHA)
        self.surf.blit(self.bitmap, (0, 0))
        return self.surf
asleep
  • 1
  • 2
    Do you maybe have a file called `image.py` in the same directory as your game? Otherwise please post the complete error message and a [minimal, complete and verifiable example](https://stackoverflow.com/help/mcve). – skrx Sep 23 '17 at 18:03
  • where did you see this message, within Pycharm ? This doesn't block the application, maybe you need another fix, please provide more code to reproduce this issue – PRMoureu Sep 23 '17 at 20:54

0 Answers0