]> git.cworth.org Git - apitrace/blobdiff - image/image.hpp
image: Fix allocation of floating point images.
[apitrace] / image / image.hpp
index e36bdd0a2c174560dca1643da738adae1c3cdcbd..1b21acd1e2e5a51d004b6df605ed7a68cde520ae 100644 (file)
@@ -64,7 +64,7 @@ public:
         channelType(t),
         bytesPerPixel(channels * (t == TYPE_FLOAT ? 4 : 1)),
         flipped(f),
-        pixels(new unsigned char[h*w*c])
+        pixels(new unsigned char[h*w*bytesPerPixel])
     {}
 
     inline ~Image() {