This page is part of the edition ring, it describes:
- How to save boards as BMP and JPEG
- How to save games as HTML maps
- Common HTML control options
- Advanced HTML control options
This page closes the ring. The first page is here.
| | |
| | |
|
|
 | |  |
|
How to save boards as BMP and JPEG
| |
 | |  |
|
|
There are two functions for saving gobans as BMP:
- Select a goban and press <Ctrl>+<P> (or select "Print active area"). This function saves the current goban (including
its territory map, if visible) to a temporary BMP file and opens it in the program linked with the extension .BMP in your system. That
program should be able to print the bitmap. This is the only function that can save the territory map.
- Save the gametree. At the file dialog, select "Fast HTML game map (with boards as BMP)" as the output format. Which nodes are saved
as bitmaps is explained later.
There is one function for saving gobans as JPEG:
- Save the gametree. At the file dialog, select "HTML game map (JPEG boards)" as the output format. Which nodes are saved
as bitmaps is explained later. JPEG image quality can be defined in "Advanced HTML options" inside "Extended options".
The size of a bitmap can be computed using the following formula:
Bitmap size X = Bitmap size Y = (board size in stones + 1) times (cell size in pixels)
Example: If you force cell size in pixels = 20 (This is done by setting "Minimum grid step" = "Maximum grid step" = 20 in board options.) and
the "board size in stones" = 19, the result is (19 + 1)*20 = 400. The bitmaps will be of 400x400 pixels.
| | |
| | |
|
|
 | |  |
|
How to save games as HTML maps
| |
 | |  |
|
|
There are two different ways to do this:
The first one is, as mentioned above, saving the gametree selecting the following formats at the file dialog:
- "Fast HTML game map (with boards as BMP)". It is called fast, because it does not require converting the bitmap
files to JPEG format. It saves the gametree as name you selected.htm and creates a folder called
name you selected_files at the same folder where you are saving the file. That folder includes all the bitmaps.
Both board bitmaps and other bitmaps used in the map such as: arrows, etc. Windows Explorer moves both (the .htm file and
the _files folder) together when you copy the map to another folder. This is the fastest and best looking of the two
options (.BMP or .JPEG) but it has two major drawbacks: 1. Since .bmp files use no compression, they are extremely
big. Maps containing many boards (one hundred or more) may be enormous. 2. Even if supported by Windows browsers
(Mozilla or Explorer) it is far from being an Internet standard. The only true Internet standard bitmap file formats are
.GIF and .JPEG.
- "HTML game map (JPEG boards)". It is slower, because files are converted to .JPEG and does not look as good
because .JPEG compression is destructive. It saves the gametree as name you selected.html and creates a folder
called name you selected_files at the same folder where you are saving the file. Windows Explorer moves both
together as in the previous case. The advantage of this format is double: It is small and truly Internet standard.
The second one is creating game maps from a batch file.
 |
You can create a Fast HTML game map (with boards as BMP) from a file called myfile.sgf, by typing (assume GoKnot
is in the command path):
goknot --htm myfile.sgf
This creates the file myfile.htm and the folder myfile_files with all the appropriate bitmaps.
You can create a HTML game map (JPEG boards) from a file called myfile.sgf, by typing (same assumption):
goknot --html myfile.sgf
This creates the file myfile.html and the folder myfile_files with all the appropriate bitmaps.
In both cases all applicable options are the last options you set at the corresponding GoKnot's dialogs.
|
| | |
| | |
|
|
 | |  |
|
Common HTML control options
| |
 | |  |
|
|
1. The game map header
The game map header is drawn if the option "Extended options"/"More HTML options"/"Include game header" is checked.
The game header shows all non empty SGF properties available at "Game description". Also, the property GN (Game name)
becomes the HTML file's title.
2. Where does the map start
By default, the game map starts: At node zero if node zero has annotation, else at the first node. The option
"Extended options"/"More HTML options"/"Skip first moves", when checked, shows the additional option "Num. of moves to skip".
If you set this to, e.g. 50, the game map will start at node 51.
3. What boards are drawn
What boards are drawn is controlled by the options at "Extended options"/"Draw the board":

The option "each n moves" show the additional option
"Draw the board each [ _ ] move(s)".
4. How are boards drawn
This is defined at board options.
5. Where does the map end
By default, the game map ends at the end of the game. The option "Extended options"/"More HTML options"/"Stop before the end",
when checked, shows the additional option "Stop at move num.". That is the number of the last node included.
6. Game evaluation
If you check the option "Extended options"/"More HTML options"/"Include board evaluation", the engine will evaluate the board:

The first two lines include the game result defined in the RE property and the names of the players. As a comparison, the
lines following show the detailed board evaluation as explained in "Verbose game state".
The evaluation should only be correct, if the game is finished.
Read this for details.
| | |
| | |
|
|
 | |  |
|
Advanced HTML control options
| |
 | |  |
|
|
This category includes:
- Defining the precise size of the HTML items.
- Defining the font styles.
- Defining the font colors.
 |
This is complicated! Anything other than changing a color, should only be done by people understanding HTML.
|
What follows are remarks copied from GoKnot's source code. The first part is the declaration of the variables in the
dialog (to see their internal names) and the remaining is the description of the tables. That should let you understand
what is happening when you change the variables.
{<BLANKLINE>}
{>Dialog widths}{<LBOLD>} // 20 bytes
Min_TotContaiX : integer; {<MIN 1>} {>Header/footer table X} {<RITALIC>} {>>(min.)}
Abs_GamDscNamX : integer; {<MIN 1>} {>Game descriptors X} {<RITALIC>} {>>(header)}
Abs_StDscNameX : integer; {<MIN 1>} {>Footer descriptors X} {<RITALIC>} {>>(footer)}
Min_NodeTableX : integer; {<MIN 1>} {>Node subtable X} {<RITALIC>} {>>(min.)}
Abs_NodeAnnotX : integer; {<MIN 1>} {>Node annotation X} {<RITALIC>} {>>(rem<->)}
Abs_MovNumberX : integer; {<MIN 1>} {>Move number X} {<RITALIC>} {>>(<->····)}
Abs_MoveStoneX : integer; {<MIN 1>} {>Move stone X} {<RITALIC>} {>>(·<->···)}
Abs_MovDescrpX : integer; {<MIN 1>} {>Move descriptor X} {<RITALIC>} {>>(··<->··)}
Abs_MovTimingX : integer; {<MIN 1>} {>Move timing X} {<RITALIC>} {>>(···<->·)}
Abs_MoveAnnotX : integer; {<MIN 1>} {>Move annotation X} {<RITALIC>} {>>(····<->)}
{<BLANKLINE>}
{>Text styles}{<LBOLD>}
GameTitle : TextStyle; {>Game title} {<LBOLD>}
StatsDesc : TextStyle; {>Properties descriptor} {<LBOLD>}
StatsCont : TextStyle; {>Properties content} {<LBOLD>}
NodeTitle : TextStyle; {>Node titles} {<LBOLD>}
Node_Text : TextStyle; {>Node text} {<LBOLD>}
NodeAnnot : TextStyle; {>Node SGF annotations} {<LBOLD>}
NodeFixed : TextStyle {>Node fixed width} {<LBOLD>}
{<BLANKLINE>}
H T M L T A B L E S
=====================
Table dimensions (all tables)
-----------------------------
[1] Dim_Min_TotalContainerX13 IS >= itself, 1.25*[2] + border, 1.25*[11]
[1] Dim_Min_TotalContainerX2 IS >= itself, [3] + border
[2] Dim_Abs_GameDescrNamesX
[3] Dim_Min_NodesAllThreadsX IS >= itself, (max # of simult threads)*[4]
[4] Dim_Min_NodeX_Out IS Dim_Min_NodeX_In + increase due to table nesting
[5] Dim_Min_NodeX_In IS >= itself, 2*[5] + border, [6] + [7] + [8] + [9] + [10] + border
[6] Dim_Abs_NodeAnnotX
[7] Dim_Abs_MoveNumberX
[8] Dim_Abs_MoveStoneX
[9] Dim_Abs_MoveDescripX
[10] Dim_Abs_MoveTimingX
[11] Dim_Abs_MoveAnnotX
[12] Dim_Abs_StatDescrNamesX
Text styles (all tables)
------------------------
{1} txStyle_GameTitle
{2} txStyle_StatsDescription
{3} txStyle_StatsContent
{4} txStyle_NodeTitle
{5} txStyle_NodeText
{6} txStyle_NodeAnnotations
{7} txStyle_NodeFixed
Section 1. Game description tables
----------------------------------
(1)----------<== [1] Dim_Min_TotalContainerX13 ==>--------------+ (1) Global container (for tables 1 & 3)
| GN{1} | Mandatory, Name
| ------------------------------------------------------------- |
| GC{1} | Only if not void
| ------------------------------------------------------------- |
| |
| (2)-<== [2] ==>--------+-----------<=AUTO=>-----------------+ |
| | Event{2} | EV{3} | | Only if not void
| | ---------------------+----------------------------------- | |
| | Place{2} | PC{3} | | " "
| | ---------------------+----------------------------------- | |
| | . . . | |
| | ---------------------+----------------------------------- | |
| | Copyright{2} | CP{3} | | " "
| +----------------------+------------------------------------+ |
| |
+---------------------------------------------------------------+ The global container ends at the end of section 1.
Section 2. Node/moves description tables
----------------------------------------
(Variation when the node is not empty:)
(1)-----------<== [1] Dim_Min_TotalContainerX2 ==>--------------+ (1) Global container (for table 2)
| |
| (2)----------------<== [3] Dim_Min_NodesAllThreadsX ==>-----+ | (2) Applicable number of variations
| | | | |
| | (3)-------<== [4] Dim_Min_NodeX_Out ==>--------+ | O | | (3) Node/move descriptor
| | | [->symbol] Node name{4} | | t | |
| | | -------------------------------------------- | | h | |
| | | centered board image | | e | |
| | | -------------------------------------------- | | r | |
| | | (4)-----<== [5] Dim_Min_NodeX_In ==>-------+ | | | | (4) Labels on the board
| | | | <b>Labels on the board:</b>{5}<br> | | | v | | Only if not void
| | | | <b>(1)</b> Bla, bla, bla{5}<br> | | | a | |
| | | +------------------------------------------+ | | r | |
| | | -------------------------------------------- | | i | |
| | | (4)------<=AUTO=>-----------+-<== [6] ==>--+ | | a | | (4) Node annotation
| | | | Remarks{5} |hotspot{6}<br>| | | t | | Only if not void
| | | | Remarks{5} |annot{6}<br> | | | i | |
| | | | Remarks{5} |value{6}<br> | | | o | |
| | | +---------------------------+--------------+ | | n | |
| | | -------------------------------------------- | | s | |
| | | (4)-----+-----+-------+-----------+--------+ | | | | (4) Move descriptor
| | | |<=[7]=>|<[8]>|<=[9]=>|<== [10] =>|<=[11]=>| | | | |
| | | |n<b>{7}|{bkc}| mov{7}|mm:ss/by{7}| man{6} | | | . | | Move number, link as a black or white stone button, move (justif)
| | | +-------+-----+-------+-----------+--------+ | | . | | Only if not void: time+byo (only 4 player who moved) + annotation
| | | [->symbol] End of variation | | . | | Only if applicable
| | +----------------------------------------------+ | . | |
| | | | |
| +--------------------------------------------------+--------+ |
| | Other variations . . . | | |
| +--------------------------------------------------+--------+ |
+---------------------------------------------------------------+ The global container ends at the end of section 2.
OR (Variation when the node continues below:)
(1)-----------<== [1] Dim_Min_TotalContainerX2 ==>--------------+ (1) Global container (for table 2)
| |
| (2)----------------<== [3] Dim_Min_NodesAllThreadsX ==>-----+ | (2) Applicable number of variations
| | | . | |
| | centered [->symbol] Skip to next | . | |
| | | . | |
| +--------------------------------------------------+--------+ |
| | Other variations . . . | | |
| +--------------------------------------------------+--------+ |
+---------------------------------------------------------------+ The global container ends at the end of section 2.
OR (Variation when the cell does not contain a node)
(1)-----------<== [1] Dim_Min_TotalContainerX2 ==>--------------+ (1) Global container (for table 2)
| |
| (2)----------------<== [3] Dim_Min_NodesAllThreadsX ==>-----+ | (2) Applicable number of variations
| | | . | |
| | - void - | . | |
| | | . | |
| +--------------------------------------------------+--------+ |
| | Other variations . . . | | |
| +--------------------------------------------------+--------+ |
+---------------------------------------------------------------+ The global container ends at the end of section 2.
Section 3. Game statistics
--------------------------
(1)----------<== [1] Dim_Min_TotalContainerX13 ==>--------------+ (1) Global container (for tables 1 & 3)
| Game statistics{1} |
| ------------------------------------------------------------- |
| (2)--<== [12] Dim_Abs_StatDescrNamesX ==>--+----<=AUTO=>----+ |
| | Result{2} | RE{3} | |
| | -----------------------------------------+--------------- | |
| | Winner{2} | player name{3} | |
| | -----------------------------------------+--------------- | |
| | Result estimated by the engine{2} | {3} | |
| | -----------------------------------------+--------------- | |
| | Black territory:<br> | {3} | |
| | Stones captured by black:<br> | | |
| | White territory:<br> | | |
| | Stones captured by white:<br> | | |
| | Komi:<br> | | |
| | -----------------------------------------+--------------- | |
| | Engine ID{2} | {3} | |
| | -----------------------------------------+--------------- | |
| | This HTML file was generated by{2} | GoKnot 2.0{3} | |
| | -----------------------------------------+--------------- | |
| | GoKnot can be downloaded at{2} | www.dybot.com/ | |
| | | GoKnot{3} | |
| | -----------------------------------------+--------------- | |
| | Copyright{2} | {3} | | Only if defined
| +------------------------------------------+----------------+ |
| |
+---------------------------------------------------------------+
| | |
| | |
|