1# bmpsuite "questionable" tests
2
3# See ../README.mozilla for details.
4
5# BMP: bihsize=40, 127 x 64, bpp=1, compression=0, colors=1
6# "1 bit/pixel paletted image, with only one color in the palette. The
7# documentation says that 1-bpp images have a palette size of 2 (not 'up to
8# 2'), but it would be silly for a viewer not to support a size of 1."
9# [We accept it. So does Chromium.]
10fuzzy(1,926) == pal1p1.bmp pal1p1.png
11
12# BMP: bihsize=64, 127 x 64, bpp=1, compression=3, colors=2
13# "My attempt to make a BMP file with Huffman 1D compression. It is quite
14# possibly incorrect. Even if everything else about it is correct, I have no
15# way to know whether it is black/white reversed."
16# [We reject it. So does Chromium.]
17== wrapper.html?pal1huff.bmp about:blank
18
19# BMP: bihsize=40, 127 x 64, bpp=2, compression=0, colors=4
20# "A paletted image with 2 bits/pixel. Usually only 1, 4, and 8 are allowed,
21# but 2 is legal on Windows CE."
22# [We reject it. So does Chromium.]
23== wrapper.html?pal2.bmp about:blank
24
25# BMP: bihsize=40, 127 x 64, bpp=2, compression=0, colors=4
26# "Same as pal2.bmp, but with a color palette instead of grayscale palette."
27== wrapper.html?pal2color.bmp about:blank
28
29# BMP: bihsize=40, 127 x 64, bpp=4, compression=2, colors=13
30# "An RLE-compressed image that used 'delta' codes to skip over some pixels,
31# leaving them undefined. Some viewers make undefined pixels transparent,
32# others make them black, and others assign them palette color 0 (purple, in
33# this case)."
34# [We make the undefined pixels transparent. So does Chromium.]
35== pal4rletrns.bmp pal4rletrns.png
36
37# BMP: bihsize=40, 127 x 64, bpp=4, compression=2, colors=13
38# "An RLE-compressed image that uses “delta” codes, and early EOL & EOBMP
39# markers, to skip over some pixels."
40== pal4rlecut.bmp pal4rlecut.png
41
42# BMP: bihsize=40, 127 x 64, bpp=8, compression=1, colors=253
43# "8-bit version of q/pal4rletrns.bmp."
44# [Ditto.]
45== pal8rletrns.bmp pal8rletrns.png
46
47# BMP: bihsize=40, 127 x 64, bpp=8, compression=1, colors=253
48# "8-bit version of q/pal4rlecut.bmp."
49== pal8rlecut.bmp pal8rlecut.png
50
51# BMP: bihsize=40, 127 x 64, bpp=8, compression=0, colors=252
52# "A file with some unused bytes between the palette and the image. This is
53# probably valid, but I’m not 100% sure."
54# [We accept it. So does Chromium.]
55fuzzy(1,996) == pal8offs.bmp pal8.png
56
57# BMP: bihsize=40, 127 x 64, bpp=8, compression=0, colors=300
58# "An 8-bit image with 300 palette colors. This may be invalid, because the
59# documentation could be interpreted to imply that 8-bit images aren’t allowed
60# to have more than 256 colors."
61# [We accept it. So does Chromium.]
62fuzzy(1,996) == pal8oversizepal.bmp pal8.png
63
64# BMP: bihsize=12, 127 x 64, bpp=8, compression=0, colors=0
65# # "Some OS/2 BMP specifications say that the size field in the file header
66# should be set to the aggregate size of the file header and infoheader,
67# instead of the total file size. For OS/2v1, that means it will always be 26.
68# BMP decoders usually ignore this field, so it shouldn’t cause a problem."
69fuzzy(1,996) == pal8os2-sz.bmp pal8.png
70
71# BMP: bihsize=12, 127 x 64, bpp=8, compression=0, colors=0
72# "Some OS/2 BMP specifications define the fields at offsets 6 and 8 to be a
73# “hotspot” (for cursor graphics). Though the fields are not used in BMP files,
74# they are sometimes, as in this file, set to nonzero values. This should cause
75# no problems, except that it could prevent some programs from detecting this
76# file as a BMP file."
77fuzzy(1,996) == pal8os2-hs.bmp pal8.png
78
79# BMP: bihsize=12, 127 x 64, bpp=8, compression=0, colors=0
80# "An OS/2v1 with a less-than-full-sized palette. Probably not valid, but such
81# files have been seen in the wild."
82# [We reject it. Chromium accepts it but draws nothing. Rejecting seems
83# preferable given that the color and pixel data must overlap, which can only
84# lead to rubbish results.]
85== wrapper.html?pal8os2sp.bmp about:blank
86
87# BMP: bihsize=64, 127 x 64, bpp=8, compression=0, colors=252
88# "My attempt to make an OS/2v2 bitmap."
89# [We accept it. So does Chromium.]
90fuzzy(1,996) == pal8os2v2.bmp pal8.png
91
92# BMP: bihsize=16, 127 x 64, bpp=8, compression=0, colors=0
93# "An OS/2v2 bitmap whose header has only 16 bytes, instead of the full 64."
94# [We accept it. So does Chromium.]
95fuzzy(1,996) == pal8os2v2-16.bmp pal8.png
96
97# BMP: bihsize=64, 127 x 64, bpp=8, compression=0, colors=252
98# "An OS/2v2 bitmap. Like q/pal8os2-sz.bmp, the size field is set to the size
99# of the headers (78), instead of the size of the file."
100fuzzy(1,996) == pal8os2v2-sz.bmp pal8.png
101
102# BMP: bihsize=40, 127 x 64, bpp=8, compression=0, colors=252
103# "An OS/2v2 bitmap, with a 40-byte header. Like q/pal8os2-sz.bmp, the size
104# field is set to the size of the headers (54), instead of the size of the
105# file. Except for that, this file cannot be distinguished from a Windows
106# BMPv3 file."
107fuzzy(1,996) == pal8os2v2-40sz.bmp pal8.png
108
109# BMP: bihsize=40, 127 x 64, bpp=16, compression=0, colors=0
110# "Same idea as q/rgb32fakealpha.bmp. The default 16-bit color format has one
111# unused bit per pixel, and in this image some of the unused bits are set to 1.
112# It’s possible that some viewers will interpret this image as having
113# transparency."
114fuzzy(1,1296) == rgb16faketrns.bmp rgb16.png
115
116# BMP: bihsize=40, 127 x 64, bpp=16, compression=3, colors=0
117# "An unusual and silly 16-bit image, with 2 red bits, 3 green bits, and 1 blue
118# bit. Most viewers do support this image, but the colors may be darkened with
119# a yellow-green shadow. That’s because they’re doing simple bit-shifting
120# (possibly including one round of bit replication), instead of proper
121# scaling."
122== rgb16-231.bmp rgb16-231.png
123
124# BMP: bihsize=40, 127 x 64, bpp=16, compression=3, colors=0
125# "Similar to q/rgb16-231.bmp, with 3 red bits, 10 green bits, and 3 blue
126# bits."
127fuzzy(1,689) == rgb16-3103.bmp rgb16-3103.png
128
129# BMP: bihsize=124, 127 x 64, bpp=16, compression=3, colors=0
130# "A 16-bit image with an alpha channel. There are 4 bits for each color
131# channel, and 4 bits for the alpha channel. It’s not clear if this is valid,
132# but I can’t find anything that suggests it isn’t."
133== rgba16-4444.bmp rgba16-4444.png
134
135# BMP: bihsize=124, 127 x 64, bpp=16, compression=3, colors=0
136# "Similar to q/rgba16-4444.bmp, with 5 red bits, 5 green bits, 5 blue bits,
137# and a 1-bit alpha channel."
138fuzzy(1,2203) == rgba16-5551.bmp rgba16-5551.png
139
140# BMP: bihsize=124, 127 x 64, bpp=16, compression=3, colors=0
141# "Similar to q/rgba16-4444.bmp, with 1 red bit, 9 green bits, 2 blue bits,
142# and 4 bits for the alpha channel."
143== rgba16-1924.bmp rgba16-1924.png
144
145# BMP: bihsize=40, 127 x 64, bpp=24, compression=0, colors=300
146# "A 24-bit image, with a palette containing 300 colors. The fact that the
147# palette has more than 256 colors may cause some viewers to complain, but the
148# documentation does not mention a size limit."
149# [We accept it. So does Chromium.]
150== rgb24largepal.bmp rgb24.png
151
152# BMP: bihsize=124, 127 x 64, bpp=24, compression=0, colors=0
153# "My attempt to make a BMP file with an embedded color profile."
154# [We support it, though we don't do anything with the color profile. Chromium
155# also handles it.]
156== rgb24prof.bmp rgb24.png
157
158# BMP: bihsize=124, 127 x 64, bpp=24, compression=0, colors=0
159# "This image tries to test whether color profiles are fully supported. It has
160# the red and green channels swapped, and an embedded color profile that tries
161# to swap them back. Support for this is uncommon."
162# [We don't match rgb24.png as per bmpsuite, but we do match Chrome.]
163== rgb24prof2.bmp rgb24prof2.png
164
165# BMP: bihsize=124, 127 x 64, bpp=24, compression=0, colors=0
166# "My attempt to make a BMP file with a linked color profile."
167# [We accept it, though we don't do anything with the color profile. Chromium
168# also handles it.]
169== rgb24lprof.bmp rgb24.png
170
171# BMP: bihsize=124, 127 x 64, bpp=0, compression=4, colors=0
172# BMP: bihsize=124, 127 x 64, bpp=0, compression=5, colors=0
173# "My attempt to make BMP files with embedded JPEG and PNG images. These are
174# not likely to be supported by much of anything (they’re intended for
175# printers)."
176# [We reject them. So does Chromium.]
177== wrapper.html?rgb24jpeg.bmp about:blank
178== wrapper.html?rgb24png.bmp about:blank
179
180# BMP: bihsize=52, 127 x 64, bpp=32, compression=3, colors=0
181# "Similar to g/rgb32bf.bmp, but with a 52-byte “BITMAPV2INFOHEADER”. This is
182# an uncommon version of BMP, and I can’t confirm that this file is correct."
183# [We reject them. So does Chromium.]
184== wrapper.html?rgb32h52.bmp about:blank
185
186# BMP: bihsize=124, 127 x 64, bpp=32, compression=3, colors=0
187# "Color channels are the same size and order as rgb32bfdef.bmp, but they use
188# the highest available bits, instead of the lowest (or vice versa, depending
189# on your byte-order perspective)."
190== rgb32-xbgr.bmp rgb24.png
191
192# BMP: bihsize=40, 127 x 64, bpp=32, compression=0, colors=0
193# "Same as g/rgb32.bmp, except that the unused bits are set to something other
194# than 0. If the image becomes transparent toward the bottom, it probably means
195# the viewer uses heuristics to guess whether the undefined data represents
196# transparency."
197# [We don't apply transparency here. Chromium does the same.]
198== rgb32fakealpha.bmp rgb24.png
199
200# BMP: bihsize=40, 127 x 64, bpp=32, compression=3, colors=0
201# "A 32 bits/pixel image, with all 32 bits used: 11 each for red and green, and
202# 10 for blue. As far as I know, this is perfectly valid, but it is unusual."
203fuzzy(1,1408) == rgb32-111110.bmp rgb24.png
204
205# BMP: bihsize=40, 127 x 64, bpp=32, compression=3, colors=0
206# "A 32 bits/pixel image, with 7 bits for red, 18 for green, and 7 for blue."
207fuzzy(1,753) == rgb32-7187.bmp rgb32-7187.png
208
209# BMP: bihsize=124, 127 x 64, bpp=32, compression=3, colors=0
210# "A BMP with an alpha channel. Transparency is barely documented, so it’s
211# possible that this file is not correctly formed. The color channels are in an
212# unusual order, to prevent viewers from passing this test by making a lucky
213# guess."
214== rgba32.bmp rgba32.png
215
216# BMP: bihsize=124, 127 x 64, bpp=32, compression=3, colors=0
217# "A 32 bits/pixel image, with 10 bits for red, 10 for green, 10 for blue, and
218# 2 for alpha."
219fuzzy(1,1296) == rgba32-1010102.bmp rgba32-1010102.png
220
221# BMP: bihsize=124, 127 x 64, bpp=32, compression=3, colors=0
222# "A 32 bits/pixel image, with 8 bits for red, 12 for green, 8 for blue, and 4
223# for alpha."
224fuzzy(1,753) == rgba32-81284.bmp rgba32-81284.png
225
226# BMP: bihsize=124, 127 x 64, bpp=32, compression=3, colors=0
227# "A 32 bits/pixel image, with 6 bits for red, 17 for green, 5 for blue, and 4
228# for alpha."
229fuzzy(1,1554) == rgba32-61754.bmp rgba32-61754.png
230
231# BMP: bihsize=40, 127 x 64, bpp=32, compression=6, colors=0
232# "An image of type BI_ALPHABITFIELDS. Supposedly, this was used on Windows CE.
233# I don’t know whether it is constructed correctly."
234# [We reject it. So does Chromium.]
235== wrapper.html?rgba32abf.bmp about:blank
236
237# BMP: bihsize=56, 127 x 64, bpp=32, compression=3, colors=0
238# "Similar to q/rgba32.bmp, but with a 56-byte “BITMAPV3INFOHEADER”. This is an
239# uncommon version of BMP, and I can’t confirm that this file is correct."
240== wrapper.html?rgba32h56.bmp about:blank
241
242