I am fairly new to XNA and I have questions in regards to textures.

Most of my of textures have a background color along with the overall image (white, black, or whatever). This is quite ugly as the users main character, ship, or bullets, ect, have this black or white background with it. Is there any function, tool, or anything that will enable me to crop the actual part of the image i want to use as the texture?

I am by no means good with and photo editors or anything graphic related.

I came up short with google, as most results led me no where.

All help is appreciated. Thank you.


1 Answer 1


XNA Texture2D Content Pipeline compilation uses original alpha channel to remove backgrounds. you can set alpha chanels in your images using image procesing tools like Paint.NET, gimp or photoshop.

There is other way just to set specyfic color (example white) to be transpatent. In "Content" project where your textures are:

  1. Right click texture you want to remove background
  2. Select properties
  3. From Properties select Content Processor -> ColorKeyColor and set it to color you want to be transparent (example 255;255;255;255 for white)
  • \$\begingroup\$ You are awesome. I dont have enough rep to do much, but thank you 10fold. =D \$\endgroup\$
    – TheNoob
    Jan 24, 2013 at 23:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .