You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it seems that we always allocate the wrong amount of memory whenever PixelType != unsigned char since we're allocating an array of PixelType with array size being the desired size of memory in bytes (i.e. if PixelType is float, we're actually allocating 4* as much memory as we need).
perhaps instead we should be using pixels = new PixelType[pixelsSize];
The text was updated successfully, but these errors were encountered:
looking at:
https://github.com/openframeworks/openFrameworks/blob/master/libs/openFrameworks/graphics/ofPixels.cpp#L465
it seems that we always allocate the wrong amount of memory whenever
PixelType != unsigned char
since we're allocating an array ofPixelType
with array size being the desired size of memory in bytes (i.e. ifPixelType
is float, we're actually allocating 4* as much memory as we need).perhaps instead we should be using
pixels = new PixelType[pixelsSize];
The text was updated successfully, but these errors were encountered: