20 #ifndef OST_IO_MAP_IO_PNG_HANDLER_HH
21 #define OST_IO_MAP_IO_PNG_HANDLER_HH
25 namespace ost {
namespace io {
31 PNG(
bool normalize_on_save =
true);
33 bool GetNormalizeOnSave()
const;
34 void SetNormalizeOnSave(
bool normalize_on_save);
35 Real GetMaximum()
const;
36 Real GetMinimum()
const;
38 static String FORMAT_STRING;
42 bool normalize_on_save_;
45 class MapIOPngHandler:
public MapIOHandler {
52 virtual void Import(
img::MapHandle& sh,
const boost::filesystem::path& loc,
const ImageFormatBase& formatstruct );
54 virtual void Export(
const img::MapHandle& sh,
const boost::filesystem::path& loc,
const ImageFormatBase& formatstruct)
const;
55 virtual void Export(
const img::MapHandle& sh, std::ostream& loc,
const ImageFormatBase& formatstruct)
const;
57 static bool MatchType(
const ImageFormatBase& type);
static String GetFormatName()
MapIOHandlerFactory< MapIOPngHandler > MapIOPngHandlerFactory
static bool MatchType(const ImageFormatBase &type)
static String GetFormatDescription()
static bool ProvidesExport()
static bool MatchSuffix(const String &loc)
static bool MatchContent(unsigned char *header)
virtual void Export(const img::MapHandle &sh, const boost::filesystem::path &loc, const ImageFormatBase &formatstruct) const
virtual void Import(img::MapHandle &sh, const boost::filesystem::path &loc, const ImageFormatBase &formatstruct)
Map IO handler to read/write png image files.
static bool ProvidesImport()