|
Blender V4.3
|
#include <cstring>#include <optional>#include <zlib.h>#include "blendthumb.hh"#include "BLI_endian_defines.h"#include "BLI_endian_switch.h"#include "BLI_vector.hh"Go to the source code of this file.
Macros | |
| #define | PNG_CHUNK_EXTRA 12 |
Functions | |
| static void | png_extend_native_int32 (blender::Vector< uint8_t > &output, int32_t data) |
| static void | png_chunk_create (blender::Vector< uint8_t > &output, const uint32_t tag, const blender::Vector< uint8_t > &data) |
| static blender::Vector< uint8_t > | filtered_rows_from_thumb (const Thumbnail *thumb) |
| static std::optional< blender::Vector< uint8_t > > | zlib_compress (const blender::Vector< uint8_t > &data) |
| std::optional< blender::Vector< uint8_t > > | blendthumb_create_png_data_from_thumb (const Thumbnail *thumb) |
Expose blendthumb_create_png_data_from_thumb that creates the PNG data but does not write it to a file.
Definition in file blendthumb_png.cc.
| #define PNG_CHUNK_EXTRA 12 |
The number of bytes each chunk uses on top of the data that's written.
Definition at line 31 of file blendthumb_png.cc.
Referenced by blendthumb_create_png_data_from_thumb().
| std::optional< blender::Vector< uint8_t > > blendthumb_create_png_data_from_thumb | ( | const Thumbnail * | thumb | ) |
Definition at line 83 of file blendthumb_png.cc.
References BLI_assert, Thumbnail::data, blender::Vector< T, InlineBufferCapacity, Allocator >::extend_unchecked(), filtered_rows_from_thumb(), Thumbnail::height, blender::Array< T, InlineBufferCapacity, Allocator >::is_empty(), MAKE_ID, png_chunk_create(), PNG_CHUNK_EXTRA, png_extend_native_int32(), blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), Thumbnail::width, and zlib_compress().
Referenced by extract_png_from_blend_file().
|
static |
Definition at line 47 of file blendthumb_png.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append_unchecked(), BLI_assert, Thumbnail::data, blender::Vector< T, InlineBufferCapacity, Allocator >::extend_unchecked(), Thumbnail::height, blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and Thumbnail::width.
Referenced by blendthumb_create_png_data_from_thumb().
|
static |
Definition at line 33 of file blendthumb_png.cc.
References png_extend_native_int32().
Referenced by blendthumb_create_png_data_from_thumb().
|
static |
Definition at line 22 of file blendthumb_png.cc.
References BLI_endian_switch_int32(), ENDIAN_ORDER, and L_ENDIAN.
Referenced by blendthumb_create_png_data_from_thumb(), and png_chunk_create().
|
static |
Definition at line 63 of file blendthumb_png.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::data(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by blendthumb_create_png_data_from_thumb().