# HG changeset patch # User Tero Marttila # Date 1264386831 -7200 # Node ID ecd87b41e88422c42947ff7c3386e8c99eb81fa9 # Parent d4a62899587f872f52feef30b3f330b419a82a09 pyx: Image.open diff -r d4a62899587f -r ecd87b41e884 python/pypngtile.pyx --- a/python/pypngtile.pyx Mon Jan 25 04:33:38 2010 +0200 +++ b/python/pypngtile.pyx Mon Jan 25 04:33:51 2010 +0200 @@ -53,6 +53,7 @@ int pt_image_open (pt_image **image_ptr, pt_ctx *ctx, char *png_path, int cache_mode) int pt_image_info_ "pt_image_info" (pt_image *image, pt_image_info **info_ptr) int pt_image_status (pt_image *image) + int pt_image_load (pt_image *image) int pt_image_update (pt_image *image, pt_image_params *params) int pt_image_tile_file (pt_image *image, pt_tile_info *info, stdio.FILE *out) int pt_image_tile_mem (pt_image *image, pt_tile_info *info, char **buf_ptr, size_t *len_ptr) @@ -145,6 +146,16 @@ return trap_err("pt_image_status", pt_image_status(self.image) ) + + + def open (self) : + """ + Open the underlying cache file for reading, if available. + """ + + return trap_err("pt_image_load", + pt_image_load(self.image) + ) def update (self, background_color = None) :