2007-06-30 20:25:49 +00:00
|
|
|
|
|
|
|
|
#ifndef LIBSL_H
|
|
|
|
|
#define LIBSL_H
|
|
|
|
|
|
2008-08-27 02:36:28 +00:00
|
|
|
#include "../libopenjpeg/openjpeg.h"
|
|
|
|
|
|
2007-08-25 09:36:33 +00:00
|
|
|
struct MarshalledImage
|
2007-06-30 20:25:49 +00:00
|
|
|
{
|
|
|
|
|
unsigned char* encoded;
|
|
|
|
|
int length;
|
2007-09-12 06:06:29 +00:00
|
|
|
int dummy; // padding for 64-bit alignment
|
2007-06-30 20:25:49 +00:00
|
|
|
|
|
|
|
|
unsigned char* decoded;
|
|
|
|
|
int width;
|
|
|
|
|
int height;
|
2008-08-27 02:36:28 +00:00
|
|
|
int layers;
|
|
|
|
|
int resolutions;
|
2007-06-30 20:25:49 +00:00
|
|
|
int components;
|
2008-08-27 02:36:28 +00:00
|
|
|
int packet_count;
|
|
|
|
|
opj_packet_info_t* packets;
|
2007-06-30 20:25:49 +00:00
|
|
|
};
|
|
|
|
|
|
2007-07-08 05:13:48 +00:00
|
|
|
#ifdef WIN32
|
2007-06-30 20:25:49 +00:00
|
|
|
#define DLLEXPORT extern "C" __declspec(dllexport)
|
2007-07-08 05:13:48 +00:00
|
|
|
#else
|
2007-07-12 01:50:19 +00:00
|
|
|
#define DLLEXPORT extern "C"
|
2007-07-08 05:13:48 +00:00
|
|
|
#endif
|
2007-06-30 20:25:49 +00:00
|
|
|
|
|
|
|
|
// uncompresed images are raw RGBA 8bit/channel
|
2008-07-27 10:06:45 +00:00
|
|
|
DLLEXPORT bool DotNetEncode(MarshalledImage* image, bool lossless);
|
|
|
|
|
DLLEXPORT bool DotNetDecode(MarshalledImage* image);
|
2008-08-27 02:36:28 +00:00
|
|
|
DLLEXPORT bool DotNetDecodeWithInfo(MarshalledImage* image);
|
2008-07-27 10:06:45 +00:00
|
|
|
DLLEXPORT bool DotNetAllocEncoded(MarshalledImage* image);
|
|
|
|
|
DLLEXPORT bool DotNetAllocDecoded(MarshalledImage* image);
|
|
|
|
|
DLLEXPORT void DotNetFree(MarshalledImage* image);
|
2007-06-30 20:25:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|