-
Notifications
You must be signed in to change notification settings - Fork 0
/
TODO
169 lines (132 loc) · 3.8 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
To-do list:
Author's tasks:
* Make the -i option work (once the library can support suppressing
normal IDAT processing).
* MNG support? (May mean an MNG library has to be written first...)
MNG test images are at ftp://swrinde.nde.swri.edu/pub/mng/images.
Glenn adds:
Also you can make all the test images you want by capturing animated
GIF ad banners and converting them with ImageMagick's "convert". I've
made about 450 of them and haven't yet found one that wouldn't convert.
Can't post them though because they don't belong to me. Use "-quality 90"
to get the best compression of typical GIF banners.
Blue-sky stuff:
Structured syntax for ICC profiles. See <http://www.color.org/>.
The following is a plausible XML syntax. Would it be an improvement?
<IHDR
height={long}
width={long}
bitdepth={byte}
[using=color+palette+alpha] # PNG color type information
[interlace=none|adam7] # Adam7 assumed if interlacing on
/>
<PLTE>
[<rgb r={byte} g={byte} b={byte}/>|<rgb name={string}>]*
</PLTE>
<IDAT>
{data}
</IDAT>
<gAMA gamma={float}/>
<cHRM
white=({float},{float}) # White point x and y
red=({float},{float})
green=({float},{float})
blue=({float},{float})
/>
<sRGB intent={byte}/> # Colorimetry intent, range 0-3
<iCCP name={keyword}> # International Color Consortium profile
<pixels>{data}</pixels>
</iCCP>
<sBIT
red={byte} # Color images only
blue={byte} # Color images only
green={byte} # Color images only
gray={byte} # Grayscale images only
alpha={byte} # Images with alpha only
/>
<bKGD
red={short} # Color images only
blue={short} # Color images only
green={short} # Color images only
gray={short} # Grayscale images only
index={byte} # Paletted images only
/>
<hIST>
{short} [, {short}]* # Count must match palette size
</hIST>
<tRNS
[gray={short}] # Grayscale images only
[red={short}] # True-color images only
[green={short}] # True-color images only
[blue={short}] # True-color images only
/>
or
<tRNS>
[{byte}]* # Paletted images only
</tRNS>
<pHYs
xpixels={long}
ypixels={long}
[per meter]
/>
<tIME
year={short}
month={byte}
day={byte}
hour={byte}
minute={byte}
second={byte}
/>
<tEXt keyword={keyword}> # Ordinary text chunk
{data}
</tEXt>
<zTXt keyword={keyword}> # Compressed text chunk
{data}
</zTXt>
<iTXt # International UTF-8 keywo
language={keyword}
keyword={keyword}
translated={keyword} # Translation of the keyword
[compressed=yes|no] # Defaults to "no"
>{data}</iTXt>
<oFFs
xoffset={slong}
yoffset={slong}
[unit=pixels|micrometers]*
/>
<sPLT name={keyword} depth={byte}>
[<rgbaf r={short}, g={short}, b={short}, a={short}, f={short}>]*
</sPLT>
<pCAL
name={keyword}
x0={slong}
x1={slong}
mapping linear|euler|exponential|hyperbolic
unit={string}
[parameters={string}]
>
<sCAL
unit=meter|radian
width={string}
height={string}
/>
<IMAGE>
{data}
</IMAGE>
<gIFg
disposal={byte}
input={byte}
delay={short}
/>
<gIFx
identifier={string} # Must be 8 characters
code={string}> # Must be 3 characters
>{data}</gIFx>
<private name={string}> # Private chunk declaration
{data}
</private>
In data, remember we have to escape any '<' or '&' characters. Or use a
CDATA marked section, then you only have to escape ]]> which is unlikely
(but possible) to occur.
An XML parser is required to halt on well formedness errors, deal with
entities, and so on.