summaryrefslogtreecommitdiff
path: root/plugins/AdvaImg/src/FreeImage/J2KHelper.h
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2014-12-13 20:28:24 +0000
committerKirill Volinsky <mataes2007@gmail.com>2014-12-13 20:28:24 +0000
commitd2d798d0f11abcbf141db69869e76e8d123ec1eb (patch)
treecee8645964030b4b80231952885911f724850d12 /plugins/AdvaImg/src/FreeImage/J2KHelper.h
parenta400ebf572dcad9b43d1b641b1742814f8b5e8a5 (diff)
FreeImage updated to 3.16
git-svn-id: http://svn.miranda-ng.org/main/trunk@11379 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/AdvaImg/src/FreeImage/J2KHelper.h')
-rw-r--r--plugins/AdvaImg/src/FreeImage/J2KHelper.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/plugins/AdvaImg/src/FreeImage/J2KHelper.h b/plugins/AdvaImg/src/FreeImage/J2KHelper.h
new file mode 100644
index 0000000000..a8121f164e
--- /dev/null
+++ b/plugins/AdvaImg/src/FreeImage/J2KHelper.h
@@ -0,0 +1,36 @@
+#ifndef J2K_HELPER_H
+#define J2K_HELPER_H
+
+// ==========================================================
+// Helper functions (see J2KHelper.cpp)
+// ==========================================================
+
+/**
+FreeImageIO wrapper
+*/
+typedef struct tagJ2KFIO_t {
+ FreeImageIO *io; //! FreeImage IO
+ fi_handle handle; //! FreeImage handle
+ opj_stream_t *stream; //! OpenJPEG stream
+} J2KFIO_t;
+
+/**
+Stream constructor
+*/
+J2KFIO_t* opj_freeimage_stream_create(FreeImageIO *io, fi_handle handle, BOOL bRead);
+
+/**
+Stream destructor
+*/
+void opj_freeimage_stream_destroy(J2KFIO_t* fio);
+
+/**
+Conversion opj_image_t => FIBITMAP
+*/
+FIBITMAP* J2KImageToFIBITMAP(int format_id, const opj_image_t *image, BOOL header_only);
+/**
+Conversion FIBITMAP => opj_image_t
+*/
+opj_image_t* FIBITMAPToJ2KImage(int format_id, FIBITMAP *dib, const opj_cparameters_t *parameters);
+
+#endif // J2K_HELPER_H \ No newline at end of file