SUMO - Simulation of Urban MObility
MFXImageHelper.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2005-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
17 // static helpers for loading and saving images in various formats
18 /****************************************************************************/
19 #ifndef MFXImageHelper_h
20 #define MFXImageHelper_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #ifdef _MSC_VER
27 #include <windows_config.h>
28 #else
29 #include <config.h>
30 #endif
31 
32 #include <string>
33 #include <vector>
34 #include <fx.h>
36 
38 public:
39  static void checkSupported(FXString ext);
40  static FXImage* loadImage(FXApp* a, const std::string& file);
41  static FXbool scalePower2(FXImage* image, int maxSize = (2 << 29));
42  static FXbool saveImage(const std::string& file,
43  int width, int height, FXColor* data);
44 
45 
46 };
47 
48 
49 #endif
50 
51 /****************************************************************************/
52 
static FXbool scalePower2(FXImage *image, int maxSize=(2<< 29))
static FXbool saveImage(const std::string &file, int width, int height, FXColor *data)
static FXImage * loadImage(FXApp *a, const std::string &file)
static void checkSupported(FXString ext)