pt_image_load
authorTero Marttila <terom@fixme.fi>
Thu, 31 Dec 2009 17:37:31 +0200
changeset 25 a2d30ea44cbe
parent 24 0d319520916e
child 26 72fd5ba8d8c1
pt_image_load
include/pngtile.h
src/lib/image.c
--- 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;