FORUM ARCHIVED

restore transparency in image

Discussion in 'Modding' started by Bohandas, Aug 1, 2012.

  1. Bohandas

    Bohandas Member

    i put together a bunch of custom images for a homebrew items mod, but accidentally saved them in a way that removed transparency, ie. the blank space around the image was saved as a background white space which shows up in the game when the image is displayed, blocking out floor, inventory space or other background of the square the item is in. Is there any way to convert the white back into transparent so that this will display right?
     
  2. Daynab

    Daynab Community Moderator Staff Member

    You should be able to load the image in most art programs and "delete" the white background to replace it as transparent.
     
  3. Phobus

    Phobus Member

    As an example in GIMP [free image software]

    • Open your image.
    • Create new layer. [Layer -> New Layer]
      • Make sure it's the size of your image [for example 32x32]
      • Make sure "Transparency" is selected.
    • Merge the layers [Layer -> Merge Down]
    • Select the toolbox window [typically on the left]
      • Click 'Fuzzy Select' [looks like a magic wand]
    • Click on the color you want to be transparent [in your example the white]
      • Press delete.
    • Make sure you save as a type that can handle transparency, like png.
     
    Daynab likes this.
  4. FaxCelestis

    FaxCelestis Will Mod for Digglebucks

    Or instead of making a new layer, fuzzy select the area you want transparent, go to the Image menu, scroll down to Transparency, and select Color to Alpha...
     
  5. Phobus

    Phobus Member

    Hmm I may need to update GIMP, I don't have that option. :eek: