]> git.cworth.org Git - apitrace/blobdiff - image/image.hpp
image: Yet another fix for the PFM dumping.
[apitrace] / image / image.hpp
index 857e0621c1386e5d9a72eb9dba6e9ff467a35322..8e6b51fdf6758cfa0eb7fab43d34caa52d6d2412 100644 (file)
@@ -49,6 +49,7 @@ public:
     unsigned height;
     unsigned channels;
     ChannelType channelType;
+    unsigned bytesPerChannel;
     unsigned bytesPerPixel;
 
     // Flipped vertically or not
@@ -62,7 +63,8 @@ public:
         height(h),
         channels(c),
         channelType(t),
-        bytesPerPixel(channels * (t == TYPE_FLOAT ? 4 : 1)),
+        bytesPerChannel(t == TYPE_FLOAT ? 4 : 1),
+        bytesPerPixel(channels * bytesPerChannel),
         flipped(f),
         pixels(new unsigned char[h*w*bytesPerPixel])
     {}