1 /* GIMP - The GNU Image Manipulation Program 2 * Copyright (C) 1995 Spencer Kimball and Peter Mattis 3 * 4 * This program is free software: you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 3 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program. If not, see <https://www.gnu.org/licenses/>. 16 */ 17 18 #ifndef __OPENEXR_WRAPPER_H__ 19 #define __OPENEXR_WRAPPER_H__ 20 21 G_BEGIN_DECLS 22 23 /* This is fully opaque on purpose, as the calling C code must not be 24 * exposed to more than this. 25 */ 26 typedef struct _EXRLoader EXRLoader; 27 28 typedef enum 29 { 30 PREC_UINT, 31 PREC_HALF, 32 PREC_FLOAT 33 } EXRPrecision; 34 35 typedef enum 36 { 37 IMAGE_TYPE_RGB, 38 IMAGE_TYPE_GRAY 39 } EXRImageType; 40 41 42 EXRLoader * exr_loader_new (const char *filename); 43 44 EXRLoader * exr_loader_ref (EXRLoader *loader); 45 void exr_loader_unref (EXRLoader *loader); 46 47 int exr_loader_get_width (EXRLoader *loader); 48 int exr_loader_get_height (EXRLoader *loader); 49 50 EXRPrecision exr_loader_get_precision (EXRLoader *loader); 51 EXRImageType exr_loader_get_image_type (EXRLoader *loader); 52 int exr_loader_has_alpha (EXRLoader *loader); 53 54 GimpColorProfile * exr_loader_get_profile (EXRLoader *loader); 55 gchar * exr_loader_get_comment (EXRLoader *loader); 56 guchar * exr_loader_get_exif (EXRLoader *loader, 57 guint *size); 58 guchar * exr_loader_get_xmp (EXRLoader *loader, 59 guint *size); 60 61 int exr_loader_read_pixel_row (EXRLoader *loader, 62 char *pixels, 63 int bpp, 64 int row); 65 66 G_END_DECLS 67 68 #endif /* __OPENEXR_WRAPPER_H__ */ 69