I'm creating images for an online game, which requires them to be a .png as well as indexed with a transparent background. The problem that we have been having is that when we index the transparent pngs, the gimp chooses a color that has been used in the image to represent the transparent background. As a result, when displayed in our client (the game), the pixels that have the same color as the transparent background and are supposed to be displayed... are not.
We have figured that if we use the traditional pink color (%100 red, 0% green, %100 blue) for the transparent background, this won't happen (or it'll happen extremely rarely--who uses that color in their artwork? ). Thus, my question:
When indexing (a png), how do I select the transparent color?
____________
Also, because I am doing this to a couple hundred images (>1000, I'm sure), I tried to develop a script using script-fu. With me being a really, really bad programmer, it never happened . If anyone could make a script that I can run to somehow automate this process (at least a little), I would be very grateful.
I was thinking something like... I open all of the files, I run the script, then all I need to do is select (by color) the background of each file to be transparent (maybe it would be better if I selected before running the script?). The script would then clear that selection, index the image (using default values), and save it. Perhaps another script that I could run before this would assure that all of the images have an alpha layer?
I would be awesome if I that, and would take hours off of my workload.
Thanks, all
Cheers,
Unislash
We have figured that if we use the traditional pink color (%100 red, 0% green, %100 blue) for the transparent background, this won't happen (or it'll happen extremely rarely--who uses that color in their artwork? ). Thus, my question:
When indexing (a png), how do I select the transparent color?
____________
Also, because I am doing this to a couple hundred images (>1000, I'm sure), I tried to develop a script using script-fu. With me being a really, really bad programmer, it never happened . If anyone could make a script that I can run to somehow automate this process (at least a little), I would be very grateful.
I was thinking something like... I open all of the files, I run the script, then all I need to do is select (by color) the background of each file to be transparent (maybe it would be better if I selected before running the script?). The script would then clear that selection, index the image (using default values), and save it. Perhaps another script that I could run before this would assure that all of the images have an alpha layer?
I would be awesome if I that, and would take hours off of my workload.
Thanks, all
Cheers,
Unislash