summaryrefslogtreecommitdiffstats
path: root/fb2png/img_process.h
diff options
context:
space:
mode:
authorTalustus <talustus@dream-irc.de>2013-04-06 11:50:07 +0200
committerDees_Troy <dees_troy@teamw.in>2013-07-01 22:22:17 +0200
commit3019a9172b36b9e2033d92dccdb8ff8e2282da7c (patch)
tree3938a34520ea3b6c3519efb93cbeadce64018e84 /fb2png/img_process.h
parentFix some issues with wipe partition list (diff)
downloadandroid_bootable_recovery-3019a9172b36b9e2033d92dccdb8ff8e2282da7c.tar
android_bootable_recovery-3019a9172b36b9e2033d92dccdb8ff8e2282da7c.tar.gz
android_bootable_recovery-3019a9172b36b9e2033d92dccdb8ff8e2282da7c.tar.bz2
android_bootable_recovery-3019a9172b36b9e2033d92dccdb8ff8e2282da7c.tar.lz
android_bootable_recovery-3019a9172b36b9e2033d92dccdb8ff8e2282da7c.tar.xz
android_bootable_recovery-3019a9172b36b9e2033d92dccdb8ff8e2282da7c.tar.zst
android_bootable_recovery-3019a9172b36b9e2033d92dccdb8ff8e2282da7c.zip
Diffstat (limited to 'fb2png/img_process.h')
-rw-r--r--fb2png/img_process.h84
1 files changed, 84 insertions, 0 deletions
diff --git a/fb2png/img_process.h b/fb2png/img_process.h
new file mode 100644
index 000000000..871cfc93b
--- /dev/null
+++ b/fb2png/img_process.h
@@ -0,0 +1,84 @@
+/*
+ * -- http://android-fb2png.googlecode.com/svn/trunk/img_process.h --
+ *
+ * Copyright 2011, Kyan He <kyan.ql.he@gmail.com>
+ *
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __IMG_PROCESS_H__
+#define __IMG_PROCESS_H__
+
+/**
+ * rgba8888 is found on Desire HD Linux localhost 2.6.35.10-g931a37e #1
+ * PREEMPT Wed Nov 9 14:04:03 CST 2011 armv7l GNU/Linux
+ */
+
+
+typedef struct rgb888 {
+ char r;
+ char g;
+ char b;
+} rgb888_t;
+
+typedef rgb888_t rgb24_t;
+
+typedef struct argb8888 {
+ char a;
+ char r;
+ char g;
+ char b;
+} argb8888_t;
+
+typedef struct abgr8888 {
+ char a;
+ char b;
+ char g;
+ char r;
+} abgr8888_t;
+
+typedef struct bgra8888 {
+ char b;
+ char g;
+ char r;
+ char a;
+} bgra8888_t;
+
+typedef struct rgba8888 {
+ char r;
+ char g;
+ char b;
+ char a;
+} rgba8888_t;
+
+typedef struct rgb565 {
+ short b:5;
+ short g:6;
+ short r:5;
+} rgb565_t;
+
+int rgb565_to_rgb888(const char* src, char* dst, size_t pixel);
+
+int argb8888_to_rgb888(const char* src, char* dst, size_t pixel);
+
+int abgr8888_to_rgb888(const char* src, char* dst, size_t pixel);
+
+int bgra8888_to_rgb888(const char* src, char* dst, size_t pixel);
+
+int rgba8888_to_rgb888(const char* src, char* dst, size_t pixel);
+
+int save_png(const char* path, const char* data, int width, int height);
+
+#endif