32#include "DGtal/base/Common.h"
33#include "ConfigTest.h"
34#include "DGtalCatch.h"
35#include "DGtal/helpers/StdDefs.h"
36#include "DGtal/io/readers/STBReader.h"
37#include "DGtal/io/writers/STBWriter.h"
38#include "DGtal/images/ImageSelector.h"
40#include "DGtal/io/colormaps/GradientColorMap.h"
41#include "DGtal/io/writers/PPMWriter.h"
53 SECTION(
"Testing feature io/readers of STBWriter (Grayscale PNG)")
55 std::string filename = testPath +
"samples/contourS.png";
62 CHECK( image.isValid());
65 SECTION(
"Testing feature io/readers of STBWriter (PNG)")
67 std::string filename = testPath +
"samples/color64.png";
70 CHECK( image.isValid());
77 SECTION(
"Testing scalar functor (PNG)")
92 CHECK( image.isValid());
Structure representing an RGB triple with alpha component.
Aim: This class template may be used to (linearly) convert scalar values in a given range into a colo...
void addColor(const Color &color)
Aim: implements association bewteen points lying in a digital domain and values.
static ImageContainer import(const std::string &filename, const Functor &aFunctor=Functor())
Aim: Image Writer using the stb_image.h header only code.
static bool exportTGA(const std::string &filename, const ImageContainer &anImage, const Functor &aFunctor=Functor())
static bool exportPNG(const std::string &filename, const ImageContainer &anImage, const Functor &aFunctor=Functor())
static bool exportBMP(const std::string &filename, const ImageContainer &anImage, const Functor &aFunctor=Functor())
static bool exportJPG(const std::string &filename, const ImageContainer &anImage, const Functor &aFunctor=Functor(), int quality=70)
DGtal is the top-level namespace which contains all DGtal functions and types.
ImageContainerBySTLVector< Domain, Value > Type
static bool exportPPM(const std::string &filename, const Image &aImage, const Functor &aFunctor=Functor(), bool topbottomOrder=true)
TEST_CASE("Testing STBWriter")
ImageContainerBySTLVector< Domain, Value > Image
SECTION("Testing constant forward iterators")