1 /** 2 * MltImage.h - MLT Wrapper 3 * Copyright (C) 2021 Meltytech, LLC 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public 7 * License as published by the Free Software Foundation; either 8 * version 2.1 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public 16 * License along with this library; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 */ 19 20 #ifndef MLTPP_IMAGE_H 21 #define MLTPP_IMAGE_H 22 23 #include "MltConfig.h" 24 25 #include <framework/mlt.h> 26 27 namespace Mlt 28 { 29 class MLTPP_DECLSPEC Image 30 { 31 private: 32 mlt_image instance; 33 public: 34 Image(); 35 Image( mlt_image image ); 36 Image( int width, int height, mlt_image_format format ); 37 virtual ~Image( ); 38 mlt_image_format format(); 39 int width(); 40 int height(); 41 void set_colorspace( int colorspace ); 42 int colorspace(); 43 void alloc( int width, int height, mlt_image_format format, bool alpha = false ); 44 void init_alpha(); 45 uint8_t* plane( int plane ); 46 int stride( int plane ); 47 }; 48 } 49 50 #endif 51