--- a/include/pngtile.h Thu Dec 31 17:06:25 2009 +0200
+++ b/include/pngtile.h Thu Dec 31 17:37:31 2009 +0200
@@ -116,7 +116,7 @@
* Load the image's cache in read-only mode without trying to update it.
*/
// XXX: rename to pt_image_open?
-// TODO: int pt_image_load (struct pt_image *image);
+int pt_image_load (struct pt_image *image);
/**
* Render a PNG tile to a FILE*.
--- a/src/lib/image.c Thu Dec 31 17:06:25 2009 +0200
+++ b/src/lib/image.c Thu Dec 31 17:37:31 2009 +0200
@@ -226,6 +226,11 @@
return pt_image_update_cache(image);
}
+int pt_image_load (struct pt_image *image)
+{
+ return pt_cache_open(image->cache);
+}
+
int pt_image_tile_file (struct pt_image *image, const struct pt_tile_info *info, FILE *out)
{
struct pt_tile tile;