Classes | |
| struct | PNGDescr |
| struct | IStream |
| struct | Image |
| struct | ImageColorscale |
| struct | ReadBuf |
| struct | ReadBufStream |
Typedefs | |
| using | ImageGreyscale = Image<uint8_t> |
Functions | |
| bool | is_png (const ReadBuf &rb) |
| static void | png_read_callback (png_struct *png_ptr, png_bytep outBytes, png_size_t byteCountToRead) |
| static bool | png_read_header_guarded (png_struct *png, png_info *info, IStream *in_buf, int sig_bytes) |
| static bool | png_read_rows_guarded (png_struct *png, png_info *info, png_bytep dst, size_t rows, size_t rowbytes, bool bottom_up, bool read_end) |
| bool | decode_png (IStream &in_buf, ImageGreyscale &out_img) |
| bool | decode_colored_png (IStream &in_buf, ImageColorscale &out_img) |
| bool | decode_colored_png (const ReadBuf &in_buf, ImageColorscale &out_img) |
| bool | is_decodable_8bit_png (const ReadBuf &pngbuf) |
| static bool | write_rgb_or_gray_to_file (const char *file_name_utf8, size_t width, size_t height, int png_color_type, const uint8_t *data) |
| bool | write_rgb_to_file (const char *file_name_utf8, size_t width, size_t height, const uint8_t *data_rgb) |
| bool | write_rgb_to_file (const std::string &file_name_utf8, size_t width, size_t height, const uint8_t *data_rgb) |
| bool | write_rgb_to_file (const std::string &file_name_utf8, size_t width, size_t height, const std::vector< uint8_t > &data_rgb) |
| bool | write_gray_to_file (const char *file_name_utf8, size_t width, size_t height, const uint8_t *data_gray) |
| bool | write_gray_to_file (const std::string &file_name_utf8, size_t width, size_t height, const uint8_t *data_gray) |
| bool | write_gray_to_file (const std::string &file_name_utf8, size_t width, size_t height, const std::vector< uint8_t > &data_gray) |
| static bool | write_rgb_or_gray_to_file_scaled (const char *file_name_utf8, size_t width, size_t height, int png_color_type, const uint8_t *data, size_t scale) |
| bool | write_rgb_to_file_scaled (const char *file_name_utf8, size_t width, size_t height, const uint8_t *data_rgb, size_t scale) |
| bool | write_rgb_to_file_scaled (const std::string &file_name_utf8, size_t width, size_t height, const uint8_t *data_rgb, size_t scale) |
| bool | write_rgb_to_file_scaled (const std::string &file_name_utf8, size_t width, size_t height, const std::vector< uint8_t > &data_rgb, size_t scale) |
| bool | write_gray_to_file_scaled (const char *file_name_utf8, size_t width, size_t height, const uint8_t *data_gray, size_t scale) |
| bool | write_gray_to_file_scaled (const std::string &file_name_utf8, size_t width, size_t height, const uint8_t *data_gray, size_t scale) |
| bool | write_gray_to_file_scaled (const std::string &file_name_utf8, size_t width, size_t height, const std::vector< uint8_t > &data_gray, size_t scale) |
| template<class Img> | |
| bool | decode_png (const ReadBuf &in_buf, Img &out_img) |
| struct Slic3r::png::ReadBuf |
| Class Members | ||
|---|---|---|
| const void * | buf = nullptr | |
| const size_t | sz = 0 | |
| using Slic3r::png::ImageGreyscale = Image<uint8_t> |
| bool Slic3r::png::decode_colored_png | ( | const ReadBuf & | in_buf, |
| ImageColorscale & | out_img ) |
References decode_colored_png().
| bool Slic3r::png::decode_colored_png | ( | IStream & | in_buf, |
| ImageColorscale & | out_img ) |
References Slic3r::png::Image< PxT >::buf, Slic3r::png::ImageColorscale::bytes_per_pixel, Slic3r::png::Image< PxT >::cols, Slic3r::png::PNGDescr::info, Slic3r::png::PNGDescr::png, png_read_header_guarded(), png_read_rows_guarded(), Slic3r::png::IStream::read(), and Slic3r::png::Image< PxT >::rows.
Referenced by decode_colored_png(), Slic3r::decode_height_texture(), and decode_png_to_thumbnail().
| bool Slic3r::png::decode_png | ( | const ReadBuf & | in_buf, |
| Img & | out_img ) |
References decode_png().
| bool Slic3r::png::decode_png | ( | IStream & | in_buf, |
| ImageGreyscale & | out_img ) |
References Slic3r::png::Image< PxT >::buf, Slic3r::png::Image< PxT >::cols, Slic3r::png::PNGDescr::info, Slic3r::png::PNGDescr::png, png_read_header_guarded(), png_read_rows_guarded(), Slic3r::png::IStream::read(), and Slic3r::png::Image< PxT >::rows.
Referenced by Slic3r::decode_height_texture(), decode_png(), and Slic3r::anonymous_namespace{SL1.cpp}::extract_slices_from_sla_archive().
| bool Slic3r::png::is_decodable_8bit_png | ( | const ReadBuf & | pngbuf | ) |
References Slic3r::png::PNGDescr::info, Slic3r::png::PNGDescr::png, png_read_header_guarded(), and Slic3r::png::ReadBufStream::read().
Referenced by Slic3r::GUI::anonymous_namespace{TextureLibrary.cpp}::is_supported_height_map().
| bool Slic3r::png::is_png | ( | const ReadBuf & | rb | ) |
References Slic3r::png::ReadBuf::buf, and Slic3r::png::ReadBuf::sz.
Referenced by Slic3r::decode_height_texture().
|
static |
Referenced by png_read_header_guarded().
|
static |
References png_read_callback().
Referenced by decode_colored_png(), decode_png(), and is_decodable_8bit_png().
|
static |
Referenced by decode_colored_png(), and decode_png().
| bool Slic3r::png::write_gray_to_file | ( | const char * | file_name_utf8, |
| size_t | width, | ||
| size_t | height, | ||
| const uint8_t * | data_gray ) |
References write_rgb_or_gray_to_file().
Referenced by Slic3r::GUI::anonymous_namespace{TextureLibrary.cpp}::encode_gray_png_bytes(), write_gray_to_file(), and write_gray_to_file().
| bool Slic3r::png::write_gray_to_file | ( | const std::string & | file_name_utf8, |
| size_t | width, | ||
| size_t | height, | ||
| const std::vector< uint8_t > & | data_gray ) |
References write_gray_to_file().
| bool Slic3r::png::write_gray_to_file | ( | const std::string & | file_name_utf8, |
| size_t | width, | ||
| size_t | height, | ||
| const uint8_t * | data_gray ) |
| bool Slic3r::png::write_gray_to_file_scaled | ( | const char * | file_name_utf8, |
| size_t | width, | ||
| size_t | height, | ||
| const uint8_t * | data_gray, | ||
| size_t | scale ) |
References scale(), and write_rgb_or_gray_to_file_scaled().
Referenced by Slic3r::SupportGridPattern::SupportGridPattern(), write_gray_to_file_scaled(), and write_gray_to_file_scaled().
| bool Slic3r::png::write_gray_to_file_scaled | ( | const std::string & | file_name_utf8, |
| size_t | width, | ||
| size_t | height, | ||
| const std::vector< uint8_t > & | data_gray, | ||
| size_t | scale ) |
References scale(), and write_gray_to_file_scaled().
| bool Slic3r::png::write_gray_to_file_scaled | ( | const std::string & | file_name_utf8, |
| size_t | width, | ||
| size_t | height, | ||
| const uint8_t * | data_gray, | ||
| size_t | scale ) |
References scale(), and write_gray_to_file_scaled().
|
static |
Referenced by write_gray_to_file(), write_rgb_or_gray_to_file_scaled(), and write_rgb_to_file().
|
static |
References scale(), Slic3r::scaled(), and write_rgb_or_gray_to_file().
Referenced by write_gray_to_file_scaled(), and write_rgb_to_file_scaled().
| bool Slic3r::png::write_rgb_to_file | ( | const char * | file_name_utf8, |
| size_t | width, | ||
| size_t | height, | ||
| const uint8_t * | data_rgb ) |
References write_rgb_or_gray_to_file().
Referenced by write_rgb_to_file(), and write_rgb_to_file().
| bool Slic3r::png::write_rgb_to_file | ( | const std::string & | file_name_utf8, |
| size_t | width, | ||
| size_t | height, | ||
| const std::vector< uint8_t > & | data_rgb ) |
References write_rgb_to_file().
| bool Slic3r::png::write_rgb_to_file | ( | const std::string & | file_name_utf8, |
| size_t | width, | ||
| size_t | height, | ||
| const uint8_t * | data_rgb ) |
| bool Slic3r::png::write_rgb_to_file_scaled | ( | const char * | file_name_utf8, |
| size_t | width, | ||
| size_t | height, | ||
| const uint8_t * | data_rgb, | ||
| size_t | scale ) |
References scale(), and write_rgb_or_gray_to_file_scaled().
Referenced by Slic3r::EdgeGrid::Grid::calculate_sdf(), Slic3r::EdgeGrid::save_png(), write_rgb_to_file_scaled(), and write_rgb_to_file_scaled().
| bool Slic3r::png::write_rgb_to_file_scaled | ( | const std::string & | file_name_utf8, |
| size_t | width, | ||
| size_t | height, | ||
| const std::vector< uint8_t > & | data_rgb, | ||
| size_t | scale ) |
References scale(), and write_rgb_to_file_scaled().
| bool Slic3r::png::write_rgb_to_file_scaled | ( | const std::string & | file_name_utf8, |
| size_t | width, | ||
| size_t | height, | ||
| const uint8_t * | data_rgb, | ||
| size_t | scale ) |
References scale(), and write_rgb_to_file_scaled().