/* Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:  */
int main(int argc, char *argv[])
/* Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:  */
int main(int argc, char *argv[])
{
    std::cout << "please provide in and out filename" << std::endl;
    return 0;
  }
  state.decoder.color_convert = 0;
  state.decoder.remember_unknown_chunks = 1;
  lodepng::load_file(buffer, argv[1]);
  error = lodepng::decode(image, w, h, state, buffer);
  if(error) {
    std::cout << "decoder error " << error << ": " << lodepng_error_text(error) << std::endl;
    return 0;
  }
  buffer.clear();
  state.encoder.text_compression = 1;
  error = lodepng::encode(buffer, image, w, h, state);
  if(error) {
    std::cout << "encoder error " << error << ": " << lodepng_error_text(error) << std::endl;
    return 0;
  }
  lodepng::save_file(buffer, argv[2]);
}