Adding Transparency around Sprites in a Sprite Sheet
Posted: 2013-12-26T12:37:30-07:00
I am working on a project which contains lots of large sprite sheets. I know the size of these sprite sheets and the size of each individual image in the sprite sheet. I need to go through these sprite sheets and add some transparency borders around each individual image within the sprite sheet. The amount of transparency that I need to add will be defined by myself and may vary depending on which side of the image I am targeting.
To make this more clear here is an example:
I have a sprite sheet which is 1504 x 560 which contains 16 sprite images each being 188 x 280. The sprite sheet has two rows of 8 images.
For this sprite sheet I need to add 20 pixels of transparency to the left side of each sprite, 16 pixels of transparency to the top side of each sprite and 10 pixels of transparency to the right side of each sprite.
The new resulting sprite sheet would have 16 sprite images each being 218 x 296 ( 188 + 20 + 10 x 280 + 16 ). The size of the sprite sheet would be 1744 x 592.
Summary:
I need a command to isolate a small section of a larger image and add different amounts of transparency to the four sides of the isolated section.
I plan to use this command in combination with a batch script to alter each image within a sprite sheet.
Thanks
To make this more clear here is an example:
I have a sprite sheet which is 1504 x 560 which contains 16 sprite images each being 188 x 280. The sprite sheet has two rows of 8 images.
For this sprite sheet I need to add 20 pixels of transparency to the left side of each sprite, 16 pixels of transparency to the top side of each sprite and 10 pixels of transparency to the right side of each sprite.
The new resulting sprite sheet would have 16 sprite images each being 218 x 296 ( 188 + 20 + 10 x 280 + 16 ). The size of the sprite sheet would be 1744 x 592.
Summary:
I need a command to isolate a small section of a larger image and add different amounts of transparency to the four sides of the isolated section.
I plan to use this command in combination with a batch script to alter each image within a sprite sheet.
Thanks