Welcome to mirror list, hosted at ThFree Co, Russian Federation.

png_memory_encoder.cpp « coding - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 80ac6b4e70ee35ada01f2065efd617e38aa2bc9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "png_memory_encoder.hpp"
#include "3party/lodepng/lodepng.hpp"

#include "base/assert.hpp"

namespace il
{

void EncodePngToMemory(uint32_t width, uint32_t height,
                       vector<uint8_t> const & rgba,
                       vector<uint8_t> & out)
{
  CHECK(LodePNG::encode(out, rgba, width, height) == 0, ());
  CHECK(out.size() != 0, ());
}

} // namespace il