More work on displaying images

This commit is contained in:
Kovid Goyal
2017-09-30 14:46:17 +05:30
parent e5898ad4b0
commit 28ae99ed37
5 changed files with 94 additions and 14 deletions

View File

@@ -204,7 +204,8 @@ class TestParser(BaseTest):
k[p] = v.encode('ascii')
for f in 'action transmission_type compressed'.split():
k.setdefault(f, b'\0')
for f in 'format more id data_sz data_offset width height x_offset y_offset data_height data_width num_cells num_lines z_index'.split():
for f in ('format more id data_sz data_offset width height x_offset y_offset data_height data_width'
' num_cells num_lines cell_x_offset cell_y_offset z_index').split():
k.setdefault(f, 0)
p = k.pop('payload', '').encode('utf-8')
k['payload_sz'] = len(p)