• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

PNG to in game sprite in 3 steps

Phasesaber

Software Engineer turned Pokemon Hacker
20
Posts
9
Years
    • Seen Apr 25, 2024
    Phase's PNG to in game sprite in 3 steps
    Using these steps, you can easily replace any Pokemon sprite with your PNG image.

    Tools you'll need:
    • Image editor for the PNG
    • Irfanview for indexing the image
    • GIMP for easy-peasy palette changing
    • Nameless Sprite Editor 2.0 for inserting the sprite

    0. Create the image
    Create your image in Paint.NET or whatever. Make sure your background color is something abstract and not in the image anywhere. The file extension of your image should be .bmp. Here's mine.
    iZfgF9j.png


    1. Index the image
    Open your image in Irfanview. You'll need to decrease the color depth to 16 colors. Image => Decrease Color Depth
    IH6InEd.png


    2. Swap the palette in GIMP
    Most people use Irfanview for this, but GIMP won't mess up the original image when swapping the palette, so you can directly import it to the ROM.

    Using GIMP, you want to go to Colors => Map => Rearrange Colormap
    j5zSh12.png


    Then you want to find your background color and move it to the front of the list. If there are more than 16 colors, you didn't do the indexing right.
    CkPH6A5.png


    Now export with Ctrl + Shift + E. You can then close GIMP. It will ask you to save it, but you don't have to because already exported it.
    EQeicaQ.png


    3. Importing the image into the game
    I'll be using Fire Red for this, but it will also work with Emerald, as NSE works... with Emerald. NSE won't work with Ruby, but you can wait for a future update for support. Once you open your ROM, navigate to what image you want to replace. Here's mine:
    bGsaHGd.png

    Doing this with images other than Pokemon sprites can be difficult, so we'll just stick to those for now.

    There are a couple keybinds we can use to make this next part super-quick. Ctrl + I will start the import process. Hitting enter here will open the file slection, select your file and it will go back to the import screen. If your background is clear, you've done the previous steps correctly. Make sure you've selected Image + Palette and save. This WON'T save it to the ROM. You'll need to save the Palette to a new Pointer (or don't if you're like, super advanced).
    acnDsQb.png


    Next you can hit Ctrl + S to save the sprite. If you go to a different Pokemon and go back, you can see if it worked. If the image in the top left corner is correct (correct palette and clear background), then you've done it! Go in game and see it!
    cjQNVNW.jpg

    You can edit the name and sprite height in G3TS. Once you memorize the keybinds and where you need to go, you can put in a new sprite in under a minute.
     
    Last edited:
    3,830
    Posts
    14
    Years
    • Age 27
    • OH
    • Seen Feb 26, 2024
    Very nice! A simple and easy to understand tutorial. I'll just point out that if you save the image as a .png it can be used in programs such as unLZ-GBA and GBA Graphics Editor and that the process is not just limited to Pokémon sprites, but rather any sprite you encounter in the games.
     

    Phasesaber

    Software Engineer turned Pokemon Hacker
    20
    Posts
    9
    Years
    • Seen Apr 25, 2024
    Very nice! A simple and easy to understand tutorial. I'll just point out that if you save the image as a .png it can be used in programs such as unLZ-GBA and GBA Graphics Editor and that the process is not just limited to Pokémon sprites, but rather any sprite you encounter in the games.

    I like NSE2's interface more than unLZ's, so I use it more. It also took me forever to understand GGE. This is mostly a tutorial on indexing the image, you can insert it anyway you want. I've never seen GIMP being used for palette changing on here, so I thought I'd show it off.
     
    Last edited:
    9
    Posts
    8
    Years
    • Seen Aug 1, 2018
    So to make the palette swap I need gimp after all... Thank you, I wasted quite a few hours trying to understand what I was doing wrong while trying to change the character's back sprites (it turned out pretty creepy if you ask me).
    Now let's see if I'll be able to make this work...
    EDIT: it seems to work! I'm finally removing Leaf's hat one sprite at a time (making the edits myself)
     
    Last edited:

    Phasesaber

    Software Engineer turned Pokemon Hacker
    20
    Posts
    9
    Years
    • Seen Apr 25, 2024
    So to make the palette swap I need gimp after all...

    You don't need GIMP, but it's the easiest to do it in. Irfranview does it fine, but it will swap the colors on the original image, giving you some demented version of your sprite, which is probably what you saw. That can be fixed by editing it in MS Paint or something, though Paint.NET will screw it up after you swap the palette. My point is that Irfranview can do it, but GIMP can do it better. I usually have Paint.NET, Irfranview, and GIMP open all at once when importing sprites.
     
    1,344
    Posts
    14
    Years
    • Seen Dec 10, 2021
    You don't need GIMP, but it's the easiest to do it in. Irfranview does it fine, but it will swap the colors on the original image, giving you some demented version of your sprite, which is probably what you saw. That can be fixed by editing it in MS Paint or something, though Paint.NET will screw it up after you swap the palette. My point is that Irfranview can do it, but GIMP can do it better. I usually have Paint.NET, Irfranview, and GIMP open all at once when importing sprites.

    Once you edit the palette in Irfanview, you can simply export palette, then reopen the image and import it. It's much faster and the sprite won't get messed up. I'm sure using GIMP is fine but if you don't want to have to install it just for that purpose you don't have to.
     

    PokéMew1

    Pokémon Fuchsia
    484
    Posts
    10
    Years
  • I had no idea you could swap the palettes with a "rearrange" button in GIMP... Now I don't have to use paint xp and paste the old over the new etc.. We learn something new everyday I guess eh?
     

    link12552

    decade club
    205
    Posts
    16
    Years
  • You don't need GIMP, but it's the easiest to do it in. Irfranview does it fine, but it will swap the colors on the original image, giving you some demented version of your sprite, which is probably what you saw. That can be fixed by editing it in MS Paint or something, though Paint.NET will screw it up after you swap the palette. My point is that Irfranview can do it, but GIMP can do it better. I usually have Paint.NET, Irfranview, and GIMP open all at once when importing sprites.

    So to make the palette swap I need gimp after all... Thank you, I wasted quite a few hours trying to understand what I was doing wrong while trying to change the character's back sprites (it turned out pretty creepy if you ask me).
    Now let's see if I'll be able to make this work...
    EDIT: it seems to work! I'm finally removing Leaf's hat one sprite at a time (making the edits myself)

    I had no idea you could swap the palettes with a "rearrange" button in GIMP... Now I don't have to use paint xp and paste the old over the new etc.. We learn something new everyday I guess eh?

    You can also swap (and switch) palette colors in NSE by right-clicking another color in the palette window.

    Swap1_zpss5fbancp.png

    Swap2_zpsjpkwhqwv.png


    "Swap," (as shown above) simply changes the palette while "Switch" also conserves the original image.

    Nice tutorial btw.
     
    9
    Posts
    8
    Years
    • Seen Aug 1, 2018
    For what I was looking to do gimp is perfect.
    I was used to paint.net before and atapting is tough but it's always better than starting all over again.
     
    Back
    Top