195 else if (status == PT_CACHE_INCOMPAT) |
195 else if (status == PT_CACHE_INCOMPAT) |
196 log_debug("\tImage cache is incompatible"); |
196 log_debug("\tImage cache is incompatible"); |
197 |
197 |
198 else if (status == PT_CACHE_FRESH) |
198 else if (status == PT_CACHE_FRESH) |
199 log_debug("\tImage cache is fresh"); |
199 log_debug("\tImage cache is fresh"); |
|
200 |
|
201 else |
|
202 log_warn("\tImage cache status is unknown"); |
200 |
203 |
201 if (!no_update) { |
204 if (!no_update) { |
202 log_debug("\tUpdating image cache..."); |
205 log_debug("\tUpdating image cache..."); |
203 |
206 |
204 if ((err = pt_image_update(image, &update_params))) { |
207 if ((err = pt_image_update(image, &update_params))) { |
220 |
223 |
221 if ((err = pt_image_info(image, &info))) { |
224 if ((err = pt_image_info(image, &info))) { |
222 log_warn_errno("pt_image_info: %s: %s", img_path, pt_strerror(err)); |
225 log_warn_errno("pt_image_info: %s: %s", img_path, pt_strerror(err)); |
223 |
226 |
224 } else { |
227 } else { |
225 log_info("\tImage dimensions: %zux%zu", info->img_width, info->img_height); |
228 log_info("\tImage dimensions: %zux%zu (%zu bpp)", info->img_width, info->img_height, info->img_bpp); |
226 log_info("\tImage mtime=%ld, bytes=%zu", (long) info->image_mtime, info->image_bytes); |
229 log_info("\tImage mtime=%ld, bytes=%zu", (long) info->image_mtime, info->image_bytes); |
227 log_info("\tCache mtime=%ld, bytes=%zu, blocks=%zu (%zu bytes)", |
230 log_info("\tCache mtime=%ld, bytes=%zu, blocks=%zu (%zu bytes), version=%d", |
228 (long) info->cache_mtime, info->cache_bytes, info->cache_blocks, info->cache_blocks * 512 |
231 (long) info->cache_mtime, info->cache_bytes, info->cache_blocks, info->cache_blocks * 512, info->cache_version |
229 ); |
232 ); |
230 } |
233 } |
231 |
234 |
232 // render tile? |
235 // render tile? |
233 if (ti.width && ti.height) { |
236 if (ti.width && ti.height) { |