|
From: Yoda-JM <yo...@us...> - 2010-07-14 18:16:22
|
Module: performous
Branch: svg_caching
Commit: 916c7353fa84d983b557bdfc52182a566b54ae21
Author: Vincent Le Ligeour <yo...@us...>
Date: Wed Jul 14 20:15:48 2010 +0200
Removed compilation warning and throw error on wrong image format
---
game/image.hh | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/game/image.hh b/game/image.hh
index 5ff8a37..1b59873 100644
--- a/game/image.hh
+++ b/game/image.hh
@@ -53,6 +53,10 @@ namespace {
png_set_IHDR(pngPtr, infoPtr, w, h, 8, PNG_COLOR_TYPE_RGBA, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
bpp = 4;
break;
+ case pix::INT_ARGB:
+ throw std::runtime_error("Writing PNG failed (pix::INT_ARGB not supported)");
+ case pix::BGR:
+ throw std::runtime_error("Writing PNG failed (pix::BGR not supported)");
}
png_write_info(pngPtr, infoPtr);
unsigned stride = (w * bpp + 3) & ~3; // Number of bytes per row (word-aligned)
|