include/pngtile.h
changeset 52 148a120ea7d5
parent 34 a387bc77ad52
child 53 8a3165c604f8
equal deleted inserted replaced
51:866eb1aad566 52:148a120ea7d5
     6  *
     6  *
     7  * Tile-based access to large PNG images.
     7  * Tile-based access to large PNG images.
     8  */
     8  */
     9 #include <stddef.h>
     9 #include <stddef.h>
    10 #include <stdio.h> // for FILE*
    10 #include <stdio.h> // for FILE*
       
    11 #include <stdint.h>
    11 
    12 
    12 /**
    13 /**
    13  * "Global" context shared between images
    14  * "Global" context shared between images
    14  */
    15  */
    15 struct pt_ctx;
    16 struct pt_ctx;
    50     /** Dimensions of image */
    51     /** Dimensions of image */
    51     size_t width, height;
    52     size_t width, height;
    52 };
    53 };
    53 
    54 
    54 /**
    55 /**
       
    56  * Modifyable params for update
       
    57  */
       
    58 struct pt_image_params {
       
    59     /** Don't write out any contiguous regions of this color. Left-aligned in whatever format the source image is in */
       
    60     uint8_t background_color[4];
       
    61 };
       
    62 
       
    63 /**
    55  * Info for image tile 
    64  * Info for image tile 
    56  *
    65  *
    57  * The tile may safely overlap with the edge of the image, but it should not be entirely outside of the image
    66  * The tile may safely overlap with the edge of the image, but it should not be entirely outside of the image
    58  */
    67  */
    59 struct pt_tile_info {
    68 struct pt_tile_info {
   107  */
   116  */
   108 int pt_image_status (struct pt_image *image);
   117 int pt_image_status (struct pt_image *image);
   109 
   118 
   110 /**
   119 /**
   111  * Update the given image's cache.
   120  * Update the given image's cache.
   112  */
   121  *
   113 int pt_image_update (struct pt_image *image);
   122  * @param params optional parameters to use for the update process
       
   123  */
       
   124 int pt_image_update (struct pt_image *image, const struct pt_image_params *params);
   114 
   125 
   115 /**
   126 /**
   116  * Load the image's cache in read-only mode without trying to update it.
   127  * Load the image's cache in read-only mode without trying to update it.
   117  */
   128  */
   118 // XXX: rename to pt_image_open?
   129 // XXX: rename to pt_image_open?