1 /* 2 */ 3 4 /* 5 6 Copyright (C) 2014 Ferrero Andrea 7 8 This program is free software: you can redistribute it and/or modify 9 it under the terms of the GNU General Public License as published by 10 the Free Software Foundation, either version 3 of the License, or 11 (at your option) any later version. 12 13 This program is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 GNU General Public License for more details. 17 18 You should have received a copy of the GNU General Public License 19 along with this program. If not, see <http://www.gnu.org/licenses/>. 20 21 22 */ 23 24 /* 25 26 These files are distributed with PhotoFlow - http://aferrero2707.github.io/PhotoFlow/ 27 28 */ 29 30 #ifndef VIPS_OPERATION_HH 31 #define VIPS_OPERATION_HH 32 33 #include <string> 34 35 #include "../base/processor.hh" 36 37 #include "blender.hh" 38 39 namespace PF 40 { 41 42 class VipsOperationPar: public BlenderPar 43 { 44 std::string op_name; 45 46 public: 47 VipsOperationPar(); 48 49 void set_op(std::string name); 50 51 void add_argument( GParamSpec *pspec, VipsArgumentClass *argument_class ); 52 53 /* Set processing hints: 54 1. the intensity parameter makes no sense for an image, 55 creation of an intensity map is not allowed 56 2. the operation can work without an input image; 57 the blending will be set in this case to "passthrough" and the image 58 data will be simply linked to the output 59 */ has_intensity()60 bool has_intensity() { return false; } needs_input()61 bool needs_input() { return false; } /* to be fixed... */ 62 63 VipsImage* build(std::vector<VipsImage*>& in, int first, 64 VipsImage* imap, VipsImage* omap, 65 unsigned int& level); 66 }; 67 68 69 70 template < OP_TEMPLATE_DEF > 71 class VipsOperationProc: public BlenderProc<OP_TEMPLATE_IMP> 72 { 73 }; 74 75 76 ProcessorBase* new_vips_operation(); 77 } 78 79 #endif 80 81 82