Lines 34-39
Link Here
|
34 |
#include <util/image/image.hpp> |
34 |
#include <util/image/image.hpp> |
35 |
#include <util/image/image_exception.hpp> |
35 |
#include <util/image/image_exception.hpp> |
36 |
#include <util/error_codes.hpp> |
36 |
#include <util/error_codes.hpp> |
|
|
37 |
#include <zlib.h> |
37 |
|
38 |
|
38 |
#define NCBI_USE_ERRCODE_X Util_Image |
39 |
#define NCBI_USE_ERRCODE_X Util_Image |
39 |
|
40 |
|
Lines 177-187
static void s_PngReadValidate(png_struct
Link Here
|
177 |
size_t& x, size_t& y, size_t& w, size_t& h) |
178 |
size_t& x, size_t& y, size_t& w, size_t& h) |
178 |
{ |
179 |
{ |
179 |
// store and validate our image's parameters |
180 |
// store and validate our image's parameters |
180 |
width = info_ptr->width; |
181 |
width = png_get_image_width(png_ptr,info_ptr); |
181 |
height = info_ptr->height; |
182 |
height = png_get_image_height(png_ptr,info_ptr); |
182 |
depth = info_ptr->channels; |
183 |
depth = png_get_channels(png_ptr,info_ptr); |
183 |
png_byte color_type = info_ptr->color_type; |
184 |
png_byte color_type = png_get_color_type(png_ptr,info_ptr); |
184 |
png_byte bit_depth = info_ptr->bit_depth; |
185 |
png_byte bit_depth = png_get_bit_depth(png_ptr,info_ptr); |
185 |
|
186 |
|
186 |
// we support only RGB and RGBA images |
187 |
// we support only RGB and RGBA images |
187 |
if ( color_type != PNG_COLOR_TYPE_RGB && |
188 |
if ( color_type != PNG_COLOR_TYPE_RGB && |