File indexing completed on 2026-04-09 07:49:45
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #pragma once
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052 #include <string>
0053 #include <vector>
0054 #include "plog/Severity.h"
0055
0056 #include "SYSRAP_API_EXPORT.hh"
0057
0058 struct SYSRAP_API SPPM
0059 {
0060 static const plog::Severity LEVEL ;
0061
0062 SPPM();
0063
0064 unsigned char* pixels ;
0065 int pwidth ;
0066 int pheight ;
0067 int pscale ;
0068 bool yflip ;
0069
0070 std::string desc() const ;
0071
0072 virtual void download() = 0 ;
0073
0074 void resize(int width, int height, int scale=1);
0075 void save(const char* path=NULL);
0076 void snap(const char* path=NULL);
0077
0078 static void save( const char* path, int width, int height, const unsigned char* image, bool yflip ) ;
0079
0080 static void write( const char* filename, const unsigned char* image, int width, int height, int ncomp, bool yflip) ;
0081 static void write( const char* filename, const float* image, int width, int height, int ncomp, bool yflip) ;
0082
0083
0084 static int read( const char* path, std::vector<unsigned char>& data, unsigned& width, unsigned& height, const unsigned ncomp, const bool yflip );
0085 static void dumpHeader( const char* path ) ;
0086 static int readHeader( const char* path, unsigned& width, unsigned& height, unsigned& mode, unsigned& bits ) ;
0087
0088 static unsigned char* MakeTestImage(const int width, const int height, const int ncomp, const bool yflip, const char* config);
0089 static unsigned ImageCompare(const int width, const int height, const int ncomp, const unsigned char* imgdata, const unsigned char* imgdata2 );
0090
0091 static void AddBorder( std::vector<unsigned char>& img, const int width, const int height, const int ncomp, const bool yflip );
0092 static void AddBorder(unsigned char* imgdata, const int width, const int height, const int ncomp, const bool yflip );
0093 static void AddMidline( std::vector<unsigned char>& img, const int width, const int height, const int ncomp, const bool yflip );
0094 static void AddMidline(unsigned char* imgdata, const int width, const int height, const int ncomp, const bool yflip );
0095 static void AddQuadline( std::vector<unsigned char>& img, const int width, const int height, const int ncomp, const bool yflip );
0096 static void AddQuadline(unsigned char* imgdata, const int width, const int height, const int ncomp, const bool yflip );
0097
0098
0099
0100
0101
0102 };
0103
0104
0105
0106