+#define IM_ERROR_COUNT 20
+typedef struct im_context_tag {
+ int error_sp;
+ size_t error_alloc[IM_ERROR_COUNT];
+ i_errmsg error_stack[IM_ERROR_COUNT];
+#ifdef IMAGER_LOG
+ int log_level;
+ FILE *lg_file;
+ const char *filename;
+ int line;
+#endif
+
+ /* file size limits */
+ i_img_dim max_width, max_height;
+ size_t max_bytes;
+
+ ptrdiff_t refcount;
+} im_context_struct;
+
+#define DEF_BYTES_LIMIT 0x40000000
+