Conversation
|
it will be closed in favor of |
| //---------------------------------------------------------------------- | ||
| template<typename PixelType> | ||
| inline ofPixels_<PixelType>::ConstLine::ConstLine(const PixelType * _begin, size_t stride, size_t componentsPerPixel, size_t lineNum, ofPixelFormat pixelFormat) | ||
| inline ofPixels_<PixelType>::ConstLine::ConstLine(const PixelType * _begin, size_t stride, size_t componentsPerPixel, size_t lineNum, ofPixelFormat _pixelFormat) |
There was a problem hiding this comment.
to differentiate the function parameter to the private member called pixelFormat;
| return 1 * sizeof(PixelType) * 8; | ||
| static size_t numChannelsFromPixelFormat(ofPixelFormat _pixelFormat) { | ||
| std::unordered_map<ofPixelFormat, size_t> pixelFormatChannels { | ||
| { OF_PIXELS_RGB, 3 }, |
| return | ||
| std::unordered_map<ofPixelFormat, std::string> { | ||
| { OF_PIXELS_GRAY, "OF_PIXELS_GRAY" }, | ||
| { OF_PIXELS_GRAY_ALPHA, "OF_PIXELS_GRAY_ALPHA" }, |
|
|
||
|
|
||
| PixelType * dstPixels = dst.getData(); | ||
| auto dstPixels = dst.getData(); |
|
Looking at this PR now, I think there are contradictions in the way OF handles pixels So a better design is needed or better yet, no design at all: I really think this (pixel manipulation) is not something that should be done at OF core level. |
simplification of pixelbits / bytes, channel count, etc.