common.h (898B)
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 PLUGINS_GIMP_COMMON_H_ 7 #define PLUGINS_GIMP_COMMON_H_ 8 9 #include <libgimp/gimp.h> 10 #include <libgimp/gimpui.h> 11 #include <math.h> 12 13 #include <fstream> 14 #include <iterator> 15 #include <string> 16 #include <vector> 17 18 #define PLUG_IN_BINARY "file-jxl" 19 #define SAVE_PROC "file-jxl-save" 20 21 // Defined by both FUIF and glib. 22 #undef MAX 23 #undef MIN 24 #undef CLAMP 25 26 #include <jxl/resizable_parallel_runner.h> 27 #include <jxl/resizable_parallel_runner_cxx.h> 28 29 namespace jxl { 30 31 class JpegXlGimpProgress { 32 public: 33 explicit JpegXlGimpProgress(const char *message); 34 void update(); 35 void finished(); 36 37 private: 38 int cur_progress; 39 int max_progress; 40 41 }; // class JpegXlGimpProgress 42 43 } // namespace jxl 44 45 #endif // PLUGINS_GIMP_COMMON_H_