aboutsummaryrefslogtreecommitdiffstats
path: root/tools/e_img_import.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/e_img_import.c')
-rw-r--r--tools/e_img_import.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/e_img_import.c b/tools/e_img_import.c
new file mode 100644
index 000000000..ba5a1898e
--- /dev/null
+++ b/tools/e_img_import.c
@@ -0,0 +1,22 @@
+#include <X11/Xlib.h>
+#include <Imlib2.h>
+
+int main(int argc, char **argv)
+{
+ Imlib_Image im;
+
+ if (argc == 1)
+ {
+ printf("usage:\n\t%s source_image.png dest.db:/key/in/db\n", argv[0]);
+ exit(-1);
+ }
+ im = imlib_load_image(argv[1]);
+ if (im)
+ {
+ imlib_context_set_image(im);
+ imlib_image_attach_data_value("compression", NULL, 9, NULL);
+ imlib_image_set_format("db");
+ imlib_save_image(argv[2]);
+ }
+ return 0;
+}