User Tools

Site Tools


falcon4:tools:bmp2cvs

Table of Contents

Bmp2cvs

BMP2CVS by Skyfire

Transform information in a Bmp file into a CVS format. This program was done mainly to ease the making of new theaters, at the request of Chris “Washout” Carter.

The idea is to analyse a given Bitmap, and by reading a configuration file, transform certain colors into a CVS format. This can be used, for example, to retrieve the roads, powerlines, trees, whatever positions given by a bitmap and get them with the F4 coordinates.

The bitmaps supported are standard Windows BMP, with the following parameters:

  • Size : 1024×1024 or 2048×2048 or 4096×4096 (corresponding to the different F4 theater sizes)
  • Colors : 256

You'll need to have all Visual Basic 6 runtime files (Comdlg32.ocx included) to run this software.

Usage

First, configure it. Read the provided example configuration file, which is rather basic. The format is:

Keyword1=r1,g1,b1 r2,g2,b2
Keyword2=r3,g3,b3

Where keyword is a word describing the feature you want to retrieve, and “R,G,B” are of course the color(s) corresponding to these features.

The result will be a CVS file with this format:

Keyword1,x1,y1
Keyword1,x2,y2
...
Keyword1,xn,yn
Keyword2,x3,y3
Keyword2,x4,y4
...
Keyword2,xm,ym

Where “x,y” are of course the coordinates in the terrain.

When your conf file is done, launch Bmp2Cvs. Input the name of the BMP file, the name of your conf file, and the name of the result CVS file (there are tooltips on all buttons if you don't know what they are supposed to do. Should be pretty obvious though).

You should see your conf file appearing in the middle text box.

Then click on Start, and wait until the program gives you the number of features found. Your CVS file should then be where you specified it should be…

Example

If you have a BMP showing roads and power lines in a F4 theater, and let's say that roads are in plain blue, and power lines in plain white or in plain green, you should use a conf file looking like this:

Powerline=255,255,255 0,255,0
Road=0,0,255

Important note: You can use different colors for a same feature. But never use two times the same feature name, or the results could be strange. I did not test it, but you should be able to use the same color for different features.

Example config file:

# Bmp2Cvs example conf file
#
# The format is rather basic :
#
# Lines starting with a "#" are of course comments
# The other lines should describe what you want the program to do
#
# Format : keyword=r,g,b r,g,b r,g,b
#
# where : keyword is the name of your feature
#         r,g,b describes a color associated to that feature
#
# You can have several colors for one feature, or of course just one
#
# NEVER use two or more times the same feature name in a given conf file
#
# You should be able to have the same color used for different
# features, but that was not tested, so I'm not really sure of the results
# If it works, that could be useful at places where different features cross
#

Powerline=255,255,255 0,255,0

Road=0,0,255

Notes

Download Bmp2Cvs.rar from Falcon.4.0.Tools.2024-03-19/ Torrent Magnet:

magnet:?xt=urn:btih:a429686bdbd1593645c62f5c7156e3e94a5ff2b4&xt=urn:btmh:1220fb71e3d1bc81942313d2af9b4ea419f2b9a19037328b76cb50f82ff41dafc174&dn=Falcon.4.0.Tools.2024-03-19&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337%2fannounce&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a6969%2fannounce
falcon4/tools/bmp2cvs.txt · Last modified: 2024-03-19 08:44 by snakeman