summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/im_attrib.h4
-rw-r--r--include/im_attrib_flat.h1
-rw-r--r--include/im_image.h10
3 files changed, 14 insertions, 1 deletions
diff --git a/include/im_attrib.h b/include/im_attrib.h
index 76302ef..f7d5b0e 100644
--- a/include/im_attrib.h
+++ b/include/im_attrib.h
@@ -45,6 +45,10 @@ public:
void CopyFrom(const imAttribTable& table)
{ imAttribTableCopyFrom(ptable, table.ptable); }
+ /** Merges the contents of the given table into this table. */
+ void MergeFrom(const imAttribTable& table)
+ { imAttribTableMergeFrom(ptable, table.ptable); }
+
/** Inserts an attribute into the table. \n
* If data_type is BYTE then count can be -1 to indicate a NULL terminated string.
* Data is duplicated if not NULL, else data is initialized with zeros.
diff --git a/include/im_attrib_flat.h b/include/im_attrib_flat.h
index db6c2d8..8b5af2d 100644
--- a/include/im_attrib_flat.h
+++ b/include/im_attrib_flat.h
@@ -25,6 +25,7 @@ const void* imAttribTableGet(const imAttribTablePrivate* ptable, const char *nam
void imAttribTableSet(imAttribTablePrivate* ptable, const char* name, int data_type, int count, const void* data);
void imAttribTableUnSet(imAttribTablePrivate* ptable, const char *name);
void imAttribTableCopyFrom(imAttribTablePrivate* ptable_dst, const imAttribTablePrivate* ptable_src);
+void imAttribTableMergeFrom(imAttribTablePrivate* ptable_dst, const imAttribTablePrivate* ptable_src);
void imAttribTableForEach(const imAttribTablePrivate* ptable, void* user_data, imAttribTableCallback attrib_func);
imAttribTablePrivate* imAttribArrayCreate(int hash_size);
diff --git a/include/im_image.h b/include/im_image.h
index 6c1a084..bd13c24 100644
--- a/include/im_image.h
+++ b/include/im_image.h
@@ -136,12 +136,20 @@ void imImageCopy(const imImage* src_image, imImage* dst_image);
void imImageCopyData(const imImage* src_image, imImage* dst_image);
/** Copies the image attributes from src to dst.
- * Includes the pallete when a MAP or GRAY image.
+ * Includes the pallete if defined in both images.
*
* \verbatim image:CopyAttributes(dst_image: imImage) [in Lua 5] \endverbatim
* \ingroup imgclass */
void imImageCopyAttributes(const imImage* src_image, imImage* dst_image);
+/** Merges the image attributes from src to dst. \n
+ * Attributes that exist in dst are not replaced.
+ * Doens NOT include the pallete.
+ *
+ * \verbatim image:MergeAttributes(dst_image: imImage) [in Lua 5] \endverbatim
+ * \ingroup imgclass */
+void imImageMergeAttributes(const imImage* src_image, imImage* dst_image);
+
/** Copy one image plane fom one image to another. \n
* Images must have the same size and type.
*