0

I was wondering if there was application to help me get the image without its border.

For example the image

enter image description here

Has black background, I was wondering if there was a way to edit the black background out and only get the character .

I want to place the character image on this background

enter image description here

I am using pygame for that :

bg = pygame.image.load('images/stonetile.bmp')

image = pygame.image.load('images/human.bmp')

screen.blit(bg, (0, 0))

screen.blit(image,player)

This what I get:

enter image description here

Thanks for the help

AbduRahman
  • 169
  • 1
  • 12

2 Answers2

0

i think there's many ways to make this image without background the one i use is to import it to Photoshop and use the auto select tool than the select the color you want to remove or the char you want to live than will remove the background , be sure when you do is to export your image as png and i hope this will help you

  • The character image was png but I converted it to bmp , You are talking about Adobe Photoshop , meaning if I select the black color it would get removed , but would not that make the background white. – AbduRahman Oct 10 '21 at 11:15
0

Set a transparent color key with set_colorkey().

The color key specifies the color that is treated as transparent. For example, if you have an image with a black background that should be transparent, set a black color key:

image = pygame.image.load('images/human.bmp')
image .set_colorkey((0, 0, 0))
Rabbid76
  • 202,892
  • 27
  • 131
  • 174