@ -28,6 +28,9 @@
number of bits per color (TODO: what to do with encodings like 565 ?)
*/
#include <cstdint>
#include <algorithm>
namespace pixel_formats {
inline uint8_t clamp(int n){
return std::min(255, std::max(0, n));
@ -12,7 +12,7 @@
#include <ostream>
#include <fstream>
#include <stdexcept>
#include <type_traits>
#include "basics.hpp"
/*
@ -9,7 +9,7 @@
#ifndef ImageStreams_jpg_hpp
#define ImageStreams_jpg_hpp
#include <stdio.h>
#include <cstdio>
#include <vector>
#include <jpeglib.h>
@ -7,16 +7,12 @@
//
#include <iostream>
#include <cstdlib>
#include <array>
#include "png.hpp"
#include "bmp.hpp"
#include "jpg.hpp"
#include <cmath>
template <typename ImageType>
void basic_colors(std::string filename) {
#ifndef ImageStreams_png_hpp
#define ImageStreams_png_hpp
#include <png.h>