MCPcopy Index your code
hub / github.com/clips/pattern / create_bmp

Function create_bmp

pattern/web/pdf/utils.py:270–276  ·  view source on GitHub ↗
(data, bits, width, height)

Source from the content-addressed store, hash-verified

268
269# create_bmp
270def create_bmp(data, bits, width, height):
271 info = struct.pack('<IiiHHIIIIII', 40, width, height, 1, bits, 0, len(data), 0, 0, 0, 0)
272 assert len(info) == 40, len(info)
273 header = struct.pack('<ccIHHI', 'B', 'M', 14+40+len(data), 0, 0, 14+40)
274 assert len(header) == 14, len(header)
275 # XXX re-rasterize every line
276 return header+info+data

Callers 1

write_imageMethod · 0.90

Calls 1

lenFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…