• Forum
  • Lounge
  • How to extract an image from a sprite sh

How to extract an image from a sprite sheet?

closed account (z0My6Up4)
Hi, I have a png file that contains a sprite sheet with many images on it. I want to use a few of the images on the sheet in a game I'm making but cannot see how to select and save only the images that I want.

I'm using Linux by the way. Is there a special program to do this?
You could use the crop tool in GIMP.
closed account (z0My6Up4)
Thanks - I never thought of using that.
Depending on the graphics library you are using there should be an option to only select a part of the sprite by giving the x, y, width, and height.
If the rendering is hardware-accelerated, giblit's suggestion may be more efficient than loading each individual image into its own texture.
Topic archived. No new replies allowed.