summaryrefslogtreecommitdiff
path: root/image/bmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'image/bmp.c')
-rw-r--r--image/bmp.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/image/bmp.c b/image/bmp.c
index 23ea740e9..ac7bc300e 100644
--- a/image/bmp.c
+++ b/image/bmp.c
@@ -162,6 +162,23 @@ void nsbmp_destroy(struct content *c)
}
+
+bool nsbmp_clone(const struct content *old, struct content *new_content)
+{
+ /* We "clone" the old content by replaying creation and conversion */
+ if (nsbmp_create(new_content, NULL) == false)
+ return false;
+
+ if (old->status == CONTENT_STATUS_READY ||
+ old->status == CONTENT_STATUS_DONE) {
+ if (nsbmp_convert(new_content) == false)
+ return false;
+ }
+
+ return true;
+}
+
+
/**
* Callback for libnsbmp; forwards the call to bitmap_create()
*