1 /* 2 * DDS GIMP plugin 3 * 4 * Copyright (C) 2004-2012 Shawn Kirst <skirst@gmail.com>, 5 * with parts (C) 2003 Arne Reuter <homepage@arnereuter.de> where specified. 6 * 7 * This program is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program. If not, see <https://www.gnu.org/licenses/>. 19 */ 20 21 #ifndef __DDSPLUGIN_H__ 22 #define __DDSPLUGIN_H__ 23 24 #define DDS_PLUGIN_VERSION_MAJOR 3 25 #define DDS_PLUGIN_VERSION_MINOR 9 26 #define DDS_PLUGIN_VERSION_REVISION 92 27 28 #define DDS_PLUGIN_VERSION \ 29 ((unsigned int)(DDS_PLUGIN_VERSION_MAJOR << 16) | \ 30 (unsigned int)(DDS_PLUGIN_VERSION_MINOR << 8) | \ 31 (unsigned int)(DDS_PLUGIN_VERSION_REVISION)) 32 33 typedef struct 34 { 35 int compression; 36 int mipmaps; 37 int savetype; 38 int format; 39 int transindex; 40 int mipmap_filter; 41 int mipmap_wrap; 42 int gamma_correct; 43 int srgb; 44 float gamma; 45 int perceptual_metric; 46 int show_adv_opt; 47 int preserve_alpha_coverage; 48 float alpha_test_threshold; 49 } DDSWriteVals; 50 51 typedef struct 52 { 53 int mipmaps; 54 int decode_images; 55 } DDSReadVals; 56 57 extern DDSWriteVals dds_write_vals; 58 extern DDSReadVals dds_read_vals; 59 60 extern GimpPDBStatusType read_dds (gchar *filename, 61 gint32 *imageID, 62 gboolean interactive_dds); 63 extern GimpPDBStatusType write_dds (gchar *filename, 64 gint32 image_id, 65 gint32 drawable_id, 66 gboolean interactive_dds); 67 68 69 #define LOAD_PROC "file-dds-load" 70 #define SAVE_PROC "file-dds-save" 71 72 #define DECODE_YCOCG_PROC "color-decode-ycocg" 73 #define DECODE_YCOCG_SCALED_PROC "color-decode-ycocg-scaled" 74 #define DECODE_ALPHA_EXP_PROC "color-decode-alpha-exp" 75 76 #endif /* __DDSPLUGIN_H__ */ 77