diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2017-07-06 01:47:40 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2017-08-07 18:32:52 +0200 |
| commit | f58aab9d6a57e48bdc60e15dd373c24de74719a9 (patch) | |
| tree | 8c2153b701957850fc186d5fd74decc61e30220e /src/lib/openjp2/openjpeg.c | |
| parent | 61fb5dd7f81c2e3dfabbb99f59dc89572d59fa37 (diff) | |
Add opj_image_data_alloc() / opj_image_data_free()
As bin/common/color.c used to directly call malloc()/free(), we need
to export functions dedicated to allocating/freeing image component data.
Diffstat (limited to 'src/lib/openjp2/openjpeg.c')
| -rw-r--r-- | src/lib/openjp2/openjpeg.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/openjp2/openjpeg.c b/src/lib/openjp2/openjpeg.c index 0071c03d..8293a58d 100644 --- a/src/lib/openjp2/openjpeg.c +++ b/src/lib/openjp2/openjpeg.c @@ -1007,3 +1007,14 @@ opj_stream_t* OPJ_CALLCONV opj_stream_create_file_stream( return l_stream; } + + +void* OPJ_CALLCONV opj_image_data_alloc(OPJ_SIZE_T size) +{ + return opj_aligned_malloc(size); +} + +void OPJ_CALLCONV opj_image_data_free(void* ptr) +{ + opj_aligned_free(ptr); +} |
