Adapt for older libpng
parent
aedea4229f
commit
bf709edf08
|
@ -56,7 +56,7 @@ namespace Util
|
|||
return false;
|
||||
}
|
||||
|
||||
bool encodePNGAndAppendToBuffer(const unsigned char *pixmap, int width, int height, std::vector<char>& output)
|
||||
bool encodePNGAndAppendToBuffer(unsigned char *pixmap, int width, int height, std::vector<char>& output)
|
||||
{
|
||||
png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
|
||||
|
||||
|
|
|
@ -14,7 +14,9 @@ namespace Util
|
|||
{
|
||||
std::string logPrefix();
|
||||
bool windowingAvailable();
|
||||
bool encodePNGAndAppendToBuffer(const unsigned char *pixmap, int width, int height, std::vector<char>& output);
|
||||
// Sadly, older libpng headers don't use const for the pixmap pointer parameter to
|
||||
// png_write_row(), so can't use const here for pixmap.
|
||||
bool encodePNGAndAppendToBuffer(unsigned char *pixmap, int width, int height, std::vector<char>& output);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue