equal
deleted
inserted
replaced
375 // read row data, non-interlaced |
375 // read row data, non-interlaced |
376 png_read_row(png, row_buf, NULL); |
376 png_read_row(png, row_buf, NULL); |
377 |
377 |
378 // skip background-colored regions to keep the cache file sparse |
378 // skip background-colored regions to keep the cache file sparse |
379 // ...in blocks of PT_CACHE_BLOCK_SIZE bytes |
379 // ...in blocks of PT_CACHE_BLOCK_SIZE bytes |
380 for (size_t col_base = 0; col_base < cache->header->width; ){ |
380 for (size_t col_base = 0; col_base < cache->header->width; col_base += PT_CACHE_BLOCK_SIZE) { |
381 // size of this block in bytes |
381 // size of this block in bytes |
382 size_t block_size = min(PT_CACHE_BLOCK_SIZE * cache->header->col_bytes, cache->header->row_bytes - col_base); |
382 size_t block_size = min(PT_CACHE_BLOCK_SIZE * cache->header->col_bytes, cache->header->row_bytes - col_base); |
383 |
383 |
384 // ...each pixel |
384 // ...each pixel |
385 for ( |
385 for ( |