<commit_before>#pragma once
//=====================================================================//
/*!	@file
	@brief	PNG クラス
    @author 平松邦仁 (<EMAIL>)
	@copyright	Copyright (C) 2019 <NAME> @n
				Released under the MIT license @n
				https://github.com/hirakuni45/glfw3_app/blob/master/LICENSE
*/
//=====================================================================//
#include "graphics/img.hpp"
#include "graphics/color.hpp"
#include "common/file_io.hpp"
#include "common/format.hpp"

#include "common/time.h"
#include "libpng/png.h"

namespace img {

	//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
	/*!
		@brief	PicoJPEG デコード・クラス
		@param[in]	PLOT	描画ファンクタ
	*/
	//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
	template <class PLOT>
	class png_in {

		PLOT&		plot_;

        bool        color_key_enable_;

        uint32_t    prgl_ref_;
        uint32_t    prgl_pos_;

	    static void read_func_(png_structp png_ptr, png_bytep buf, png_size_t size) {
        	utils::file_io* fin = (utils::file_io*)png_get_io_ptr(png_ptr);

        	size_t s = fin->read(buf, 1, size);
        	if(s != size) {
				char tmp[128];
				utils::sformat("png_io_read_func: error (read size: %d, request: %d)", tmp, sizeof(tmp))<commit_msg>Update: PNG include header path<commit_after>#pragma once
//=====================================================================//
/*!	@file
	@brief	PNG クラス
    @author 平松邦仁 (<EMAIL>)
	@copyright	Copyright (C) 2019 <NAME> @n
				Released under the MIT license @n
				https://github.com/hirakuni45/glfw3_app/blob/master/LICENSE
*/
//=====================================================================//
#include "graphics/img.hpp"
#include "graphics/color.hpp"
#include "common/file_io.hpp"
#include "common/format.hpp"

#include "common/time.h"
#include <png.h>

namespace img {

	//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
	/*!
		@brief	PicoJPEG デコード・クラス
		@param[in]	PLOT	描画ファンクタ
	*/
	//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
	template <class PLOT>
	class png_in {

		PLOT&		plot_;

        bool        color_key_enable_;

        uint32_t    prgl_ref_;
        uint32_t    prgl_pos_;

	    static void read_func_(png_structp png_ptr, png_bytep buf, png_size_t size) {
        	utils::file_io* fin = (utils::file_io*)png_get_io_ptr(png_ptr);

        	size_t s = fin->read(buf, 1, size);
        	if(s != size) {
				char tmp[128];
				utils::sformat("png_io_read_func: error (read size: %d, request: %d)", tmp, sizeof(tmp))
{'fraction_non_alphanumeric': 0.32512700273544354, 'fraction_numerical': 0.011723329425556858, 'mean_word_length': 4.059288537549407, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 12, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1635213', 'n_tokens_mistral': 980, 'n_tokens_neox': 858, 'n_words': 171}