From 16bfd14f69f131ae53b1f3d1b5af87a54d95bc38 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Thu, 12 Sep 2013 17:21:37 +0100 Subject: [PATCH] image: Fix allocation of floating point images. --- image/image.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/image/image.hpp b/image/image.hpp index e36bdd0..1b21acd 100644 --- a/image/image.hpp +++ b/image/image.hpp @@ -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() { -- 2.43.0