Use png_get_image_{width,height}() instead of info_ptr->{width,height}
Later versions of libpng (1.5.x) have made the png_info structure opaque, breaking direct access to its fields. Fortunately, the library also provides getter routines, and these are available in the more-widely- deployed 1.2.x series.
This commit is contained in:
parent
66315d5eea
commit
44a3981fbf
|
@ -400,8 +400,8 @@ void TextWindow::ScreenBackgroundImage(int link, DWORD v) {
|
||||||
png_read_png(png_ptr, info_ptr,
|
png_read_png(png_ptr, info_ptr,
|
||||||
PNG_TRANSFORM_EXPAND | PNG_TRANSFORM_STRIP_ALPHA, NULL);
|
PNG_TRANSFORM_EXPAND | PNG_TRANSFORM_STRIP_ALPHA, NULL);
|
||||||
|
|
||||||
int w; w = (int)info_ptr->width;
|
int w; w = (int)png_get_image_width(png_ptr, info_ptr);
|
||||||
int h; h = (int)info_ptr->height;
|
int h; h = (int)png_get_image_height(png_ptr, info_ptr);
|
||||||
BYTE **rows; rows = png_get_rows(png_ptr, info_ptr);
|
BYTE **rows; rows = png_get_rows(png_ptr, info_ptr);
|
||||||
|
|
||||||
// Round to next-highest powers of two, since the textures require
|
// Round to next-highest powers of two, since the textures require
|
||||||
|
|
Loading…
Reference in New Issue
Block a user