32 #if !defined(ioPNG_INCLUDE_ONCE) 33 #define ioPNG_INCLUDE_ONCE 64 VL_DEBUG_SET_OBJECT_NAME()
72 res_db->resources().push_back(img);
81 res_db->resources().push_back(img);
88 for(
unsigned i=0; i<resource->
count<
Image>(); ++i)
96 for(
unsigned i=0; i<resource->
count<
Image>(); ++i)
An abstract class representing a file.
The String class implements an advanced UTF16 (Unicode BMP) string manipulation engine.
ref< ResourceDatabase > loadResource(const String &path) const
size_t count() const
Don't use inside loops! Counts the number object of the specified type.
#define VL_INSTRUMENT_CLASS(ClassName, BaseClass)
Visualization Library main namespace.
The LoadWriterPNG class is a ResourceLoadWriter capable of reading PNG files.
VLCORE_EXPORT bool savePNG(const Image *src, const String &path, int compression=6)
void get(std::vector< ref< T > > &resources, bool clear_vector=true)
Returns all the objects of the specified type in the given vector.
void setCompression(int compression)
Sets the compression level used when saving a file. Should be between 0 and 9.
VLCORE_EXPORT bool isPNG(VirtualFile *file)
ref< ResourceDatabase > loadResource(VirtualFile *file) const
Implements a generic 1d, 2d, 3d and cubemap image that can have mipmaps.
The ref<> class is used to reference-count an Object.
VLCORE_EXPORT ref< Image > loadPNG(VirtualFile *file)
The ResourceLoadWriter class is an abstract class used to implement read/write support for one or mor...
The ResourceDatabase class contains and manipulates a set of resources.
bool writeResource(const String &path, ResourceDatabase *resource) const
bool writeResource(VirtualFile *file, ResourceDatabase *resource) const