| 1 | == GRAPHICS INTERCHANGE FORMAT |
| 2 | |
| 3 | GrafX2 format of predilection is GIF. |
| 4 | |
| 5 | GrafX2 uses the GIF89a spec for saving : |
| 6 | https://www.w3.org/Graphics/GIF/spec-gif89a.txt |
| 7 | |
| 8 | it supports a few extensions : |
| 9 | * NETSCAPE animation extension |
| 10 | * GFX2PATH original path saving extension |
| 11 | * GFX2MODE Special Drawing mode saving extension |
| 12 | * CRNG Color cycling extension |
| 13 | |
| 14 | |
| 15 | == NETSCAPE animation extension |
| 16 | see http://www.vurdalakov.net/misc/gif/netscape-looping-application-extension |
| 17 | |
| 18 | == GFX2PATH |
| 19 | Stores the original file path. |
| 20 | This is used by the backup system. |
| 21 | |
| 22 | The format is : |
| 23 | |
| 24 | {{{ |
| 25 | 0x21 Extension Label |
| 26 | 0xFF Application Extension Label |
| 27 | 0x0B Block Size |
| 28 | "GFX2PATH" Application Identifier (8 bytes) |
| 29 | "\0\0\0" Application Authentication Code (3 bytes) |
| 30 | 0xll Sub-block Data Size : path size (including null) |
| 31 | "..path.." path (null-terminated) |
| 32 | 0xll Sub-block Data Size : filename size (including null) |
| 33 | "..file.." file name (null-terminated) |
| 34 | 0x00 Block terminator |
| 35 | }}} |
| 36 | |
| 37 | == GFX2MODE |
| 38 | extension to store ::IMAGE_MODES : |
| 39 | |
| 40 | {{{ |
| 41 | |
| 42 | 0x21 Extension Label |
| 43 | 0xFF Application Extension Label |
| 44 | 0x0B Block Size |
| 45 | "GFX2MODE" Application Identifier (8 bytes) |
| 46 | "2.6" Application Authentication Code (3 bytes) |
| 47 | 0xll Sub-block Data Size |
| 48 | string label |
| 49 | ... More sub blocks can be added in the future |
| 50 | 0x00 Block terminator |
| 51 | }}} |
| 52 | |
| 53 | Supported values (as of GrafX2 2.6) : |
| 54 | * "LAYERED" (not written) |
| 55 | * "ANIMATION" (not written) |
| 56 | * "ZX_SPECTRUM" |
| 57 | * "GAMEBOYCOLOR" |
| 58 | * "THOMSON40COL" |
| 59 | * "CPC_EGX" |
| 60 | * "CPC_EGX2" |
| 61 | * "CPC_MODE5" |
| 62 | * "CPC_RASTER" |
| 63 | * "C64_HIRES" |
| 64 | * "C64_MULTICOLOR" |
| 65 | * "C64_FLI" |
| 66 | * "APPLE2_HGR" |
| 67 | * "APPLE2_DHGR" |
| 68 | |
| 69 | == CRNG color cycling extension |
| 70 | Same content as a CRNG [wiki:Develop/FileFormats/IFF IFF] chunk |
| 71 | |
| 72 | |
| 73 | {{{ |
| 74 | 0x21 Extension Label |
| 75 | 0xFF Application Extension Label |
| 76 | 0x0B Block Size |
| 77 | "CRNG\0\0\0\0" "CRNG" Application Identifier (8 bytes) |
| 78 | "1.0" Application Authentication Code (3 bytes) |
| 79 | 0xll Sub-block Data Size (6 bytes per color cycle) |
| 80 | For each color cycle : |
| 81 | 0xRRRR (big endian) Rate |
| 82 | 0xFFFF (big endian) Flags |
| 83 | 0xSS start (lower color index) |
| 84 | 0xEE end (higher color index) |
| 85 | 0x00 Block terminator |
| 86 | |
| 87 | }}} |
| 88 | |