| 6035 | |
| 6036 | #ifdef LODEPNG_COMPILE_ENCODER |
| 6037 | unsigned encode(std::vector<unsigned char>& out, const unsigned char* in, unsigned w, unsigned h, |
| 6038 | LodePNGColorType colortype, unsigned bitdepth) |
| 6039 | { |
| 6040 | unsigned char* buffer; |
| 6041 | size_t buffersize; |
| 6042 | unsigned error = lodepng_encode_memory(&buffer, &buffersize, in, w, h, colortype, bitdepth); |
| 6043 | if(buffer) |
| 6044 | { |
| 6045 | out.insert(out.end(), &buffer[0], &buffer[buffersize]); |
| 6046 | lodepng_free(buffer); |
| 6047 | } |
| 6048 | return error; |
| 6049 | } |
| 6050 | |
| 6051 | unsigned encode(std::vector<unsigned char>& out, |
| 6052 | const std::vector<unsigned char>& in, unsigned w, unsigned h, |
nothing calls this directly
no test coverage detected