Author Topic: Batch tool for the *_a.txt alpha channel txt file creation  (Read 1013 times)

Offline Ex-jazz

  • Nickel Member
  • ***
  • Posts: 482
Batch tool for the *_a.txt alpha channel txt file creation
« on: December 05, 2010, 05:14:48 PM »
Hi

Mr. Kanttori's post about the alpha channel/color related post inspired me and  I took my change to made a batch tool for the  'your-texture'_a.txt file creation.

This tool is asking first a user input for the alpha channel color RGB values. The pink (255, 0, 255) is default, but user can set any other value, if wanted.

In next step, the tool is checking through the textures in 'workfolder' to find a color value match in pallet and accordingly creating the  'your-texture'_a.txt with  proper index value in it.
This tool is also checking, if texture has correct mode and given RGB value is present.

The 'Installation'
Just unzip the file anywhere you want.

Usage
1. copy/paste your bitmap files to the Color2Alpha\workfolder folder and then start the Color2Alpha.exe.

2.Give a specific  alpha channel/color RGB values or just Ok to use default values.


3.View the result and proceed with corrective action, if needed.


A 4.6M .zip file
http://fdm4bge.1g.fi/Files/10001/AH/python/Color2Alpha.zip


This tool is made with:
python 2.6, http://www.python.org/
Easygui 0.95, http://easygui.sourceforge.net/
Python Imaging Library (PIL) PIL ver 1.1.7, http://www.pythonware.com/products/pil/
And .exe file compilation with py2exe, http://www.py2exe.org/

The python source code file, Color2Alpha.py, is included to the .zip file.

The workfolder contains a example file for the testing.

Your feedback is highly appreciate.

BR

Ex-Jazz / Xjazz
« Last Edit: December 05, 2010, 05:18:14 PM by Ex-jazz »

Offline USRanger

  • AvA Staff Member
  • Plutonium Member
  • *******
  • Posts: 10325
      • BoP Home
Re: Batch tool for the *_a.txt alpha channel txt file creation
« Reply #1 on: December 05, 2010, 06:12:02 PM »
Sweet Jazz, thanks!  Something like this will be most useful in some upcoming projects. :salute
Axis vs Allies Staff Member
☩ JG11 Sonderstaffel ☩
Flying 'Black[Death] 10' ☩JG11☩

Only the Proud, Only the Strong Ne Desit Virtus

Offline Ex-jazz

  • Nickel Member
  • ***
  • Posts: 482
Re: Batch tool for the *_a.txt alpha channel txt file creation
« Reply #2 on: December 21, 2010, 01:45:50 PM »
Sweet Jazz, thanks!  Something like this will be most useful in some upcoming projects. :salute


Hi USRanger

Thanks.

Did you give a try yet?

It would be nice to know, if there are any issues with this tool.




Offline USRanger

  • AvA Staff Member
  • Plutonium Member
  • *******
  • Posts: 10325
      • BoP Home
Re: Batch tool for the *_a.txt alpha channel txt file creation
« Reply #3 on: December 21, 2010, 02:44:39 PM »
Give me another week before I start my next project where I'll be giving this a go.  Gotta get these dang holidays outta the way first.  Will report my findings, but I trust from your previous work that all will be ok. :salute
Axis vs Allies Staff Member
☩ JG11 Sonderstaffel ☩
Flying 'Black[Death] 10' ☩JG11☩

Only the Proud, Only the Strong Ne Desit Virtus

Offline Ex-jazz

  • Nickel Member
  • ***
  • Posts: 482
Re: Batch tool for the *_a.txt alpha channel txt file creation
« Reply #4 on: February 20, 2011, 02:37:32 PM »
Give me another week before I start my next project where I'll be giving this a go.  Gotta get these dang holidays outta the way first.  Will report my findings, but I trust from your previous work that all will be ok. :salute

Hi USRanger!

Did you have a time to test this out?


Offline USRanger

  • AvA Staff Member
  • Plutonium Member
  • *******
  • Posts: 10325
      • BoP Home
Re: Batch tool for the *_a.txt alpha channel txt file creation
« Reply #5 on: February 21, 2011, 07:06:05 PM »
Sorry Jazz, no I have not.  I'll be using it on my next terrain after I get this WW1 one finished.  Sorry for the slow response about using it.  Been backed up on stuff lately. 
Axis vs Allies Staff Member
☩ JG11 Sonderstaffel ☩
Flying 'Black[Death] 10' ☩JG11☩

Only the Proud, Only the Strong Ne Desit Virtus

Offline ImADot

  • Platinum Member
  • ******
  • Posts: 6215
Re: Batch tool for the *_a.txt alpha channel txt file creation
« Reply #6 on: February 21, 2011, 07:18:40 PM »
So what does this alpha channel thingy do, and what cool stuff can I do with it?   :noid
My Current Rig:
GigaByte GA-X99-UD4 Mobo w/ 16Gb RAM
Intel i7 5820k, Win7 64-bit
NVidia GTX 970 4Gb ACX 2.0
Track IR, CH Fighterstick, CH Pro Throttle, CH Pro Pedals