Calculate strip field size once
This commit is contained in:
parent
c98802542d
commit
b546ce9fa7
@ -327,11 +327,14 @@ bool read_strip_data(TiffReader *reader, Arena *arena) {
|
||||
return false;
|
||||
}
|
||||
|
||||
u16 offset_size = reader->img.strip_offsets_type_byte_count;
|
||||
u16 counts_size = reader->img.strip_byte_count_type_byte_count;
|
||||
|
||||
for (u32 i = 0; i < reader->img.strip_count; ++i) {
|
||||
TiffStrip *strip = &(reader->img.strips[i]);
|
||||
|
||||
u16 offset_size = reader->img.strip_offsets_type_byte_count;
|
||||
u16 counts_size = reader->img.strip_byte_count_type_byte_count;
|
||||
// read_strip_field(reader, &(strip->offset), &(reader->img.strip_offsets),
|
||||
// i, offsets_total_bytes, offset_size);
|
||||
|
||||
if (offsets_total_bytes > sizeof(u32)) {
|
||||
u32 offset = reader->img.strip_offsets.long_val + offset_size * i;
|
||||
|
Loading…
Reference in New Issue
Block a user