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-2018 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // static helpers for loading and saving images in various formats
16 /****************************************************************************/
17 #ifndef MFXImageHelper_h
18 #define MFXImageHelper_h
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 #include <string>
27 #include <vector>
28 #include <fx.h>
30 
32 public:
33  static void checkSupported(FXString ext);
34  static FXImage* loadImage(FXApp* a, const std::string& file);
35  static FXbool scalePower2(FXImage* image, int maxSize = (2 << 29));
36  static FXbool saveImage(const std::string& file,
37  int width, int height, FXColor* data);
38 
39 
40 };
41 
42 
43 #endif
44 
45 /****************************************************************************/
46 
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)