How To Convert ColorMaps To PNG?
Moderators: BTT, andy55, b.dwall, juxtiphi
How To Convert ColorMaps To PNG?
Hello All
I have dozens of ColorMaps in Notepad format consisting of masses of numbers. I would like to convert these files to .PNG format. Can anyone tell me how to do this please?
I know it must be possible because I have submitted several ColorMaps in Notepad format which Andy has used in G-Force and Aeon, these have been converted to .PNG format.
Regards BTT
I have dozens of ColorMaps in Notepad format consisting of masses of numbers. I would like to convert these files to .PNG format. Can anyone tell me how to do this please?
I know it must be possible because I have submitted several ColorMaps in Notepad format which Andy has used in G-Force and Aeon, these have been converted to .PNG format.
Regards BTT
Last edited by BTT on Wed Feb 27, 2013 11:50 pm, edited 1 time in total.
How... ? Unfortunately BY HAND
. bnh kindly provided this guide. I had been using Paint.net (also free) and was able to accomplish the same results ONCE I understood the terminology and basic process. At the time, I never figured out how to import RGB text map files into ANY paint program, as a starting point. You would really THINK you should be able to ... so MAYBE someone smarter than me knows a secret.

Yeah, I too saw the guide given by bnh, actually I downloaded his guide and printed it out for future reference. (He did a very good job I thought).
I have spent hours searching the Internet and, to date am still without a program to convert the files but, I'm British and, they say the Brits never give up (we will see).
Regards BTT
I have spent hours searching the Internet and, to date am still without a program to convert the files but, I'm British and, they say the Brits never give up (we will see).
Regards BTT
Re: How To Convert ColorMaps To PNG?
Andy???BTT wrote:I have dozens of ColorMaps in Notepad format consisting of masses of numbers. I would like to convert these files to .PNG format. Can anyone tell me how to do this please?
Andy???
Hello m2c
Well, I certainly don't know python or any other program code. The thing is we know that ColorMaps can be converted to .PNG format because Andy already does it. Could you ask him how he does it on our behalf please.
Regards BTT
Well, I certainly don't know python or any other program code. The thing is we know that ColorMaps can be converted to .PNG format because Andy already does it. Could you ask him how he does it on our behalf please.
Regards BTT
Last edited by BTT on Wed Feb 27, 2013 11:53 pm, edited 1 time in total.
random thoughts ...
Since snapshots are NOW (GF4) stored in PNG format (as opposed to BMP), I wonder if one might be able to create an arbitrarily simple waveshape (i.e., a line), convert the snapshot and use the output as a starting point. To be honest, I looked at PNG format and decided I wasn't interested enough to sort through the details. I might be convinced to attempt the forementioned stunt however ... I admit that it would be somewhat (who am I kidding?!) of a kludge, but to do it right, takes more effort than I am currently willing to expend. If I get really bored and get anywhere, I will report back any positive results.
j
Update
I am actually pretty sure this DOES work ... but it still takes a fair amount of horsing around ... let me play with it a little more ... If you would LIKE, post a 'file.map' and I will convert it and YOU can decide whether it works or not ... I am sure I can simplify the procedure ... but this is NOT really a very elegant solution... but I didn't waste a lot of time either.
You can always install something like Imagemagick and use the commandline:
but it is probably just easier to hand edit with a paint program.
This may NOT be a perfect solution. Snapshots are only stored @ 8 bit color depth, therefore if you use this solution, your PNG ColorMap will also only be 8 bit (as opposed to 24bit). Does it make a difference ... I am NOT sure, but YOU will have to decide if it is significant... *.map files only described 256 different colors, but I believe each of the color values are still repesented by a 24bit value
j
Update
I am actually pretty sure this DOES work ... but it still takes a fair amount of horsing around ... let me play with it a little more ... If you would LIKE, post a 'file.map' and I will convert it and YOU can decide whether it works or not ... I am sure I can simplify the procedure ... but this is NOT really a very elegant solution... but I didn't waste a lot of time either.
Code: Select all
/* PNG
2011Jan06 JRM - Creation
Lock down (Red light) the following w/ toolbar:
Waveshape: PNG (this file)
ColorMap: Map file to convert
FlowField: '(Empty)'
Particle/Sprite(Images/Video) Stop All & UN-check Shuffle
(You COULD write a script to do the above!)
1) Resize G-Force window such that resulting Snapshot
size is as close to 256x1 pixels & still visable
the width MUST be 256 ... height less important
2) Edit(Crop) snapshot to EXACTLY 256x1 pixels
3) Try your resulting .png colormap
*/
Aspc=0
ConB=1
NUM_S_STEPS="256"
C0="-1+2*s"
X0="C0"
Y0="1"
X1="C0"
Y1="1-.001"
X2="C0"
Y2="1-.002"
X3="C0"
Y3="1-.003"
X4="C0"
Y4="1-.004"
X5="C0"
Y5="1-.005"
X6="C0"
Y6="1-.006"
Lwdt=1
Pen="s"
Meta="reactive=3 detail=3 density=3 morphable=5"
Vers=400
Code: Select all
C:\Users\JRM>convert "G-Force Screen Shot 0028.png" -crop 256x1 YourColorMap.png
This may NOT be a perfect solution. Snapshots are only stored @ 8 bit color depth, therefore if you use this solution, your PNG ColorMap will also only be 8 bit (as opposed to 24bit). Does it make a difference ... I am NOT sure, but YOU will have to decide if it is significant... *.map files only described 256 different colors, but I believe each of the color values are still repesented by a 24bit value
Last edited by jerohm on Fri Jan 07, 2011 7:51 am, edited 1 time in total.
Couldn't find a way to attach a file so copied out the data. The ColorMap is called Sarah's Dream. Good luck, I'm keeping everything crossed that it works.
0 0 0
0 0 0
0 5 9
0 9 17
0 13 26
0 18 34
0 22 43
0 26 51
0 30 60
0 35 68
0 39 77
0 43 85
0 47 94
0 52 102
0 56 111
0 60 119
0 64 128
0 69 136
0 73 145
0 77 153
0 82 162
0 86 170
0 90 179
0 94 187
0 99 196
0 103 204
0 107 213
0 111 221
0 116 230
0 120 238
0 124 247
0 128 255
0 0 0
0 6 3
0 11 6
0 17 9
0 22 11
0 28 14
0 33 17
0 38 20
0 44 22
0 49 25
0 55 28
0 60 30
0 66 33
0 71 36
0 76 39
0 82 41
0 87 44
0 93 47
0 98 50
0 104 52
0 109 55
0 114 58
0 120 60
0 125 63
0 131 66
0 136 69
0 142 71
0 147 74
0 152 77
0 158 79
0 163 82
0 169 85
0 174 88
0 180 90
0 185 93
0 190 96
0 196 99
0 201 101
0 207 104
0 212 107
0 218 109
0 223 112
0 228 115
0 234 118
0 239 120
0 245 123
0 250 126
0 255 128
0 0 0
4 4 2
8 7 3
12 10 4
16 13 5
20 17 7
24 20 8
28 23 9
32 26 10
36 30 11
40 33 13
44 36 14
48 39 15
51 43 16
55 46 18
59 49 19
63 52 20
67 56 21
71 59 22
75 62 24
79 65 25
83 68 26
87 72 27
91 75 29
95 78 30
99 81 31
102 85 32
106 88 33
110 91 35
114 94 36
118 98 37
122 101 38
126 104 40
130 107 41
134 111 42
138 114 43
142 117 44
146 120 46
149 124 47
153 127 48
157 130 49
161 133 51
165 136 52
169 140 53
173 143 54
177 146 55
181 149 57
185 153 58
189 156 59
193 159 60
197 162 62
200 166 63
204 169 64
208 172 65
212 175 66
216 179 68
220 182 69
224 185 70
228 188 71
232 192 73
236 195 74
240 198 75
244 201 76
247 204 77
0 0 0
5 3 0
9 5 0
13 7 0
17 9 0
21 11 0
25 13 0
29 15 0
33 17 0
37 19 0
41 21 0
45 23 0
49 25 0
53 27 0
57 29 0
61 31 0
65 33 0
69 35 0
73 37 0
77 39 0
81 41 0
85 43 0
90 45 0
94 47 0
98 49 0
102 51 0
106 53 0
110 55 0
114 57 0
118 59 0
122 61 0
126 63 0
130 66 0
134 68 0
138 70 0
142 72 0
146 74 0
150 76 0
154 78 0
158 80 0
162 82 0
166 84 0
170 86 0
175 88 0
179 90 0
183 92 0
187 94 0
191 96 0
195 98 0
199 100 0
203 102 0
207 104 0
211 106 0
215 108 0
219 110 0
223 112 0
227 114 0
231 116 0
235 118 0
239 120 0
243 122 0
247 124 0
251 126 0
255 128 0
0 33 65
0 35 69
0 37 74
0 39 78
0 41 82
0 43 86
0 45 90
0 47 94
0 49 98
0 51 102
0 53 106
0 55 111
0 57 115
0 59 119
0 61 123
0 64 127
0 66 131
0 68 135
0 70 139
0 72 143
0 74 148
0 76 152
0 78 156
0 80 160
0 82 164
0 84 168
0 86 172
0 88 176
0 90 180
0 92 185
0 94 189
0 97 193
0 99 197
0 101 201
0 103 205
0 105 209
0 107 213
0 109 217
0 111 222
0 113 226
0 115 230
0 117 234
0 119 238
0 121 242
0 123 246
0 125 250
0 128 255
255 255 255
Regards BTT
0 0 0
0 0 0
0 5 9
0 9 17
0 13 26
0 18 34
0 22 43
0 26 51
0 30 60
0 35 68
0 39 77
0 43 85
0 47 94
0 52 102
0 56 111
0 60 119
0 64 128
0 69 136
0 73 145
0 77 153
0 82 162
0 86 170
0 90 179
0 94 187
0 99 196
0 103 204
0 107 213
0 111 221
0 116 230
0 120 238
0 124 247
0 128 255
0 0 0
0 6 3
0 11 6
0 17 9
0 22 11
0 28 14
0 33 17
0 38 20
0 44 22
0 49 25
0 55 28
0 60 30
0 66 33
0 71 36
0 76 39
0 82 41
0 87 44
0 93 47
0 98 50
0 104 52
0 109 55
0 114 58
0 120 60
0 125 63
0 131 66
0 136 69
0 142 71
0 147 74
0 152 77
0 158 79
0 163 82
0 169 85
0 174 88
0 180 90
0 185 93
0 190 96
0 196 99
0 201 101
0 207 104
0 212 107
0 218 109
0 223 112
0 228 115
0 234 118
0 239 120
0 245 123
0 250 126
0 255 128
0 0 0
4 4 2
8 7 3
12 10 4
16 13 5
20 17 7
24 20 8
28 23 9
32 26 10
36 30 11
40 33 13
44 36 14
48 39 15
51 43 16
55 46 18
59 49 19
63 52 20
67 56 21
71 59 22
75 62 24
79 65 25
83 68 26
87 72 27
91 75 29
95 78 30
99 81 31
102 85 32
106 88 33
110 91 35
114 94 36
118 98 37
122 101 38
126 104 40
130 107 41
134 111 42
138 114 43
142 117 44
146 120 46
149 124 47
153 127 48
157 130 49
161 133 51
165 136 52
169 140 53
173 143 54
177 146 55
181 149 57
185 153 58
189 156 59
193 159 60
197 162 62
200 166 63
204 169 64
208 172 65
212 175 66
216 179 68
220 182 69
224 185 70
228 188 71
232 192 73
236 195 74
240 198 75
244 201 76
247 204 77
0 0 0
5 3 0
9 5 0
13 7 0
17 9 0
21 11 0
25 13 0
29 15 0
33 17 0
37 19 0
41 21 0
45 23 0
49 25 0
53 27 0
57 29 0
61 31 0
65 33 0
69 35 0
73 37 0
77 39 0
81 41 0
85 43 0
90 45 0
94 47 0
98 49 0
102 51 0
106 53 0
110 55 0
114 57 0
118 59 0
122 61 0
126 63 0
130 66 0
134 68 0
138 70 0
142 72 0
146 74 0
150 76 0
154 78 0
158 80 0
162 82 0
166 84 0
170 86 0
175 88 0
179 90 0
183 92 0
187 94 0
191 96 0
195 98 0
199 100 0
203 102 0
207 104 0
211 106 0
215 108 0
219 110 0
223 112 0
227 114 0
231 116 0
235 118 0
239 120 0
243 122 0
247 124 0
251 126 0
255 128 0
0 33 65
0 35 69
0 37 74
0 39 78
0 41 82
0 43 86
0 45 90
0 47 94
0 49 98
0 51 102
0 53 106
0 55 111
0 57 115
0 59 119
0 61 123
0 64 127
0 66 131
0 68 135
0 70 139
0 72 143
0 74 148
0 76 152
0 78 156
0 80 160
0 82 164
0 84 168
0 86 172
0 88 176
0 90 180
0 92 185
0 94 189
0 97 193
0 99 197
0 101 201
0 103 205
0 105 209
0 107 213
0 109 217
0 111 222
0 113 226
0 115 230
0 117 234
0 119 238
0 121 242
0 123 246
0 125 250
0 128 255
255 255 255
Regards BTT
Sarah's Dream (right click, save as...)
(don't expect THIS link to hang around, because my hosting space is very limited ... but you should be able to create the file with the documentation)
My original concern about bit depth is probably nothing to worry about ... unless someone else knows otherwise...
(don't expect THIS link to hang around, because my hosting space is very limited ... but you should be able to create the file with the documentation)
Code: Select all
// Scripts\CTRL A.txt
SetSlideShow( CONFIG_ALL_TYPES, false );
KillRunningSprites(0);
KillRunningParticles(0);
SetFlowField( "(Empty)", "", 0, 0, false );
SetWaveShape( "PNG", 0 ); // Above Posted WaveShape Config, PNG.txt
// The following should be the *.map file name to convert
// and REALLY just be SET USING the toolbar
//
// SetColorMap( "Sarah's Dream", 0 );
// I can't seem to set the window size using SetPref();
// so you need to do it manually. Windows uses the Outside
// Dimensions, where we are interested in the Inside
// Dimensions so this takes a bit of trial/error and is
// different depending on your system. I use 'Sizer.exe'
// (http://www.brianapps.net/sizer/) once I know the screenshot
// is the proper width ... 256 pixels in this case
// (right click, Properties, Details).
// TakeScreenshot() doesn't seem to like it if the height is too small,
// so just set it to any small value that works ... i.e., generates the
// screenshot.png
//
// TakeScreenshot(); // Manually Use `
// SetSlideShow( CONFIG_ALL_TYPES, true ); // Reset to whatever
// Edit the screenshot.png with your favorite paint utility, and
// crop the file to 256x1 pixels (or you can use the utility I mentioned
// above)
Last edited by jerohm on Sat Jan 08, 2011 8:19 am, edited 2 times in total.
Hello Jerohm
I have just got to say how much I admire your persistence and, your wealth of knowledge. I have not yet tried out your Script CTRL A.txt, that will be something for the weekend. I have however downloaded 'Sarah's Dream' which you converted to PNG format for which I thank you.
I emptied the existing ColorMap folder in GF just leaving the original MAP file and, the new PNG file of 'Sarah's Dream', then started up GF and, switched from one file format to the other for approx half an hour.
Observations:- I found that the colors remained very close to the originals, although the width of color was noticeably less (how much was displayed on the screen), especially the two leading colors. The two colors at the outer edges of the screen changed completely. (although this did vary according to Waveshape and Flowfield) but, enough to be annoying.
I know my explanation may not be as understandable as you would like, but, I have been honest which I believe you would want me to be.
Regards BTT
I have just got to say how much I admire your persistence and, your wealth of knowledge. I have not yet tried out your Script CTRL A.txt, that will be something for the weekend. I have however downloaded 'Sarah's Dream' which you converted to PNG format for which I thank you.
I emptied the existing ColorMap folder in GF just leaving the original MAP file and, the new PNG file of 'Sarah's Dream', then started up GF and, switched from one file format to the other for approx half an hour.
Observations:- I found that the colors remained very close to the originals, although the width of color was noticeably less (how much was displayed on the screen), especially the two leading colors. The two colors at the outer edges of the screen changed completely. (although this did vary according to Waveshape and Flowfield) but, enough to be annoying.
I know my explanation may not be as understandable as you would like, but, I have been honest which I believe you would want me to be.
Regards BTT
almost all elements within GF are specified as a baseline value, with an associated level of standard deviation (randomness), so what you observe could certainly be possible, making it unable for one to capture the true baseline via dissecting the output... but it should be close (... give or take a standard deviation, that is). Then again, there may be elements at play, that I just haven't considered. 
off to run...

off to run...
I have today run the same experiment with two of my ColorMaps that Andy has converted to PNG format that are currently included in GF. They are 'Gem Stones' and 'Persian'. (I have the originals)
'Gem Stones' in PNG format is totally missing one color, 'Persian' is also missing one color plus in addition another color has changed from the original.
The only conclusion I can arrive at is that somewhere in the conversion process data is either being missed or become's corrupted. (In my inexperienced opinion)
Regards BTT
'Gem Stones' in PNG format is totally missing one color, 'Persian' is also missing one color plus in addition another color has changed from the original.
The only conclusion I can arrive at is that somewhere in the conversion process data is either being missed or become's corrupted. (In my inexperienced opinion)
Regards BTT