| 1 |
// Copyright (c) the JPEG XL Project Authors. All rights reserved. |
| 2 |
// |
| 3 |
// Use of this source code is governed by a BSD-style |
| 4 |
// license that can be found in the LICENSE file. |
| 5 |
|
| 6 |
#ifndef TOOLS_JNI_ORG_JPEG_JPEGXL_WRAPPER_DECODER_JNI |
| 7 |
#define TOOLS_JNI_ORG_JPEG_JPEGXL_WRAPPER_DECODER_JNI |
| 8 |
|
| 9 |
#include <jni.h> |
| 10 |
|
| 11 |
#ifdef __cplusplus |
| 12 |
extern "C" { |
| 13 |
#endif |
| 14 |
|
| 15 |
/** |
| 16 |
* Get basic image information (size, etc.) |
| 17 |
* |
| 18 |
* @param ctx {in_pixel_format_out_status, out_width, out_height, pixels_size, |
| 19 |
* icc_size} tuple |
| 20 |
* @param data [in] Buffer with encoded JXL stream |
| 21 |
*/ |
| 22 |
JNIEXPORT void JNICALL |
| 23 |
Java_org_jpeg_jpegxl_wrapper_DecoderJni_nativeGetBasicInfo(JNIEnv* env, |
| 24 |
jobject /*jobj*/, |
| 25 |
jintArray ctx, |
| 26 |
jobject data_buffer); |
| 27 |
|
| 28 |
/** |
| 29 |
* Get image pixel data. |
| 30 |
* |
| 31 |
* @param ctx {in_pixel_format_out_status} tuple |
| 32 |
* @param data [in] Buffer with encoded JXL stream |
| 33 |
* @param pixels [out] Buffer to place pixels to |
| 34 |
*/ |
| 35 |
JNIEXPORT void JNICALL Java_org_jpeg_jpegxl_wrapper_DecoderJni_nativeGetPixels( |
| 36 |
JNIEnv* env, jobject /*jobj*/, jintArray ctx, jobject data_buffer, |
| 37 |
jobject pixels_buffer, jobject icc_buffer); |
| 38 |
|
| 39 |
#ifdef __cplusplus |
| 40 |
} |
| 41 |
#endif |
| 42 |
|
| 43 |
#endif // TOOLS_JNI_ORG_JPEG_JPEGXL_WRAPPER_DECODER_JNI |