Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
fix sprite.cpp compile on linux - refs #27
Browse files Browse the repository at this point in the history
  • Loading branch information
Dane Springmeyer committed Feb 3, 2014
1 parent 4a7ccfd commit 5b783f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/style/sprite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ void Sprite::loadImage(const std::string& data) {

Buffer buffer(data);

if (buffer.length < 8 || !png_check_sig((png_const_bytep)buffer.data, 8)) {
if (buffer.length < 8 || !png_check_sig((const png_bytep)buffer.data, 8)) {
fprintf(stderr, "image is not a valid PNG image\n");
return;
}
Expand All @@ -140,7 +140,7 @@ void Sprite::loadImage(const std::string& data) {
try {
png_set_read_fn(png, (png_voidp)&buffer, readCallback);
png_read_info(png, info);
png_get_IHDR(png, info, &width, &height, &depth, &color, &interlace, NULL, NULL);
png_get_IHDR(png, info, (png_uint_32*)&width, (png_uint_32*)&height, &depth, &color, &interlace, NULL, NULL);
bool alpha = (color & PNG_COLOR_MASK_ALPHA) || png_get_valid(png, info, PNG_INFO_tRNS);

// From http://trac.mapnik.org/browser/trunk/src/png_reader.cpp
Expand Down

0 comments on commit 5b783f4

Please sign in to comment.