VisibleGif
Image As Data Rows
Within the XML file, within the
-
Why work with the
<data-rows> tag block? - Small images with few colours
- Large images with lots of colours
-
Precedence in generation - after
<data-packed> and after<data-codes>
Image data as rows
Technical details
Image data as rows
^ Why work with the <data-rows> tag block?
The
The
For simple images the
^ Small images with few colours
These are the sort of images that are ideal for VisibleGif.
^ Large images with lots of colours
The
^ Precedence in generation - after <data-packed> and after <data-codes>
If an XML file contains the three versions of the image data, the precedence when generating the GIF image file is as follows.
<data-packed> <data-codes> <data-rows>
So if both
Technical details
^ Colour tables and character representations
Each colour table can have up to 256 colour entries. The first colour entry is index 0 and the last colour entry is index 255. Each entry comprises 3 bytes where the first byte is the red component, the second byte is the green component and the third byte is the blue component.
VisibleGif assigns an editable (and printable) character to each index value.
It is this editable character that is used in the
The first 90 entries in a colour table are assigned the editable characters as listed below. Other entries are assigned a unique character that represents the correct index BUT most text editor programs (such as MS Notepad) will represent this "non printing" character as a "?" or a square.
<index> 0</index> <edit>!</edit> <index> 1</index> <edit>"</edit> <index> 2</index> <edit>#</edit> <index> 3</index> <edit>$</edit> <index> 4</index> <edit>%</edit> <index> 5</index> <edit>&</edit> <index> 6</index> <edit>'</edit> <index> 7</index> <edit>(</edit> <index> 8</index> <edit>)</edit> <index> 9</index> <edit>*</edit> <index>10</index> <edit>+</edit> <index>11</index> <edit>,</edit> <index>12</index> <edit>-</edit> <index>13</index> <edit>.</edit> <index>14</index> <edit>/</edit> <index>15</index> <edit>0</edit> <index>16</index> <edit>1</edit> <index>17</index> <edit>2</edit> <index>18</index> <edit>3</edit> <index>19</index> <edit>4</edit> <index>20</index> <edit>5</edit> <index>21</index> <edit>6</edit> <index>22</index> <edit>7</edit> <index>23</index> <edit>8</edit> <index>24</index> <edit>9</edit> <index>25</index> <edit>:</edit> <index>26</index> <edit>;</edit> <index>27</index> <edit><</edit> <index>28</index> <edit>=</edit> <index>29</index> <edit>></edit> <index>30</index> <edit>?</edit> <index>31</index> <edit>@</edit> <index>32</index> <edit>A</edit> <index>33</index> <edit>B</edit> <index>34</index> <edit>C</edit> <index>35</index> <edit>D</edit> <index>36</index> <edit>E</edit> <index>37</index> <edit>F</edit> <index>38</index> <edit>G</edit> <index>39</index> <edit>H</edit> <index>40</index> <edit>I</edit> <index>41</index> <edit>J</edit> <index>42</index> <edit>K</edit> <index>43</index> <edit>L</edit> <index>44</index> <edit>M</edit> <index>45</index> <edit>N</edit> <index>46</index> <edit>O</edit> <index>47</index> <edit>P</edit> <index>48</index> <edit>Q</edit> <index>49</index> <edit>R</edit> <index>50</index> <edit>S</edit> <index>51</index> <edit>T</edit> <index>52</index> <edit>U</edit> <index>53</index> <edit>V</edit> <index>54</index> <edit>W</edit> <index>55</index> <edit>X</edit> <index>56</index> <edit>Y</edit> <index>57</index> <edit>Z</edit> <index>58</index> <edit>[</edit> <index>59</index> <edit>\</edit> <index>60</index> <edit>]</edit> <index>61</index> <edit>^</edit> <index>62</index> <edit>_</edit> <index>63</index> <edit>`</edit> <index>64</index> <edit>a</edit> <index>65</index> <edit>b</edit> <index>66</index> <edit>c</edit> <index>67</index> <edit>d</edit> <index>68</index> <edit>e</edit> <index>69</index> <edit>f</edit> <index>70</index> <edit>g</edit> <index>71</index> <edit>h</edit> <index>72</index> <edit>i</edit> <index>73</index> <edit>j</edit> <index>74</index> <edit>k</edit> <index>75</index> <edit>l</edit> <index>76</index> <edit>m</edit> <index>77</index> <edit>n</edit> <index>78</index> <edit>o</edit> <index>79</index> <edit>p</edit> <index>80</index> <edit>q</edit> <index>81</index> <edit>r</edit> <index>82</index> <edit>s</edit> <index>83</index> <edit>t</edit> <index>84</index> <edit>u</edit> <index>85</index> <edit>v</edit> <index>86</index> <edit>w</edit> <index>87</index> <edit>x</edit> <index>88</index> <edit>y</edit> <index>89</index> <edit>z</edit> |
^ Rows and character representation
The following example uses two colours ' ! ' at index 0 and ' " ' at index 1.
<lzw-minimum-code-size>2</lzw-minimum-code-size>
<data-rows>
<row count="0" >!!!!!!!!!!!!!!!!!!!!!!</row>
<row count="1" >!!!!!!!!!!!!!!!!!!!!!!</row>
<row count="2" >!!!!!!!!!!!!!!!!!!!!!!</row>
<row count="3" >!!!!!!!!!!!!!!!!!!!!!!</row>
<row count="4" >!!!!!!!!!!!!!!!!!!!!!!</row>
<row count="5" >!!!!!!!!!!!!!!!!!!!!!!</row>
<row count="6" >!!!!!!!!!!!!!!!!!!!!!!</row>
<row count="7" >!!!!!!!!!!!!!!!!!!!!!!</row>
<row count="8" >!!!!!!!!!!!!!!!!!!!!!!</row>
<row count="9" >!!!!!!!!""""""""""""!!</row>
<row count="10" >!!!!!!!""""""""""""!!!</row>
<row count="11" >!!!!!!""""""""""""!!!!</row>
<row count="12" >!!!!!""""""""""""!!!!!</row>
<row count="13" >!!!!""""""""""""!!!!!!</row>
<row count="14" >!!!""""""""""""!!!!!!!</row>
<row count="15" >!!""""""""""""!!!!!!!!</row>
<row count="16" >!!!!!!!!!!!!!!!!!!!!!!</row>
</data-rows>
|
^ Counts and interlaced images
The "count" attribute needs to be present but is not used in processing.
If an image is not interlaced the "count" in the
If the "counts" are not in order the image is interlaced as in the table below. Here the first row processed has count=0, the second row processed has count=1 (which is actually the ninth row (eighth from row 0). Small images shoule not be interlaced.
<lzw-minimum-code-size>2</lzw-minimum-code-size>
<data-rows>
<row count="0" >""""""""""""</row>
<row count="7" >"!!!!!!"""""</row>
<row count="4" >"!"!""!"""""</row>
<row count="8" >"!!!""!!!"""</row>
<row count="2" >"!""""!"!"""</row>
<row count="9" >"!""""!"!!!"</row>
<row count="5" >"!""""!"!"!"</row>
<row count="10" >"!""""!"!"!"</row>
<row count="1" >"!!!!!!"!"!"</row>
<row count="11" >"""!""""!"!"</row>
<row count="6" >"""!!!!!!"!"</row>
<row count="12" >"""""!""""!"</row>
<row count="3" >"""""!!!!!!"</row>
</data-rows>
|