Hi, I am going through the source code for the above project and I don't understand the following lines of code can anyone help explain it to me please? I am trying to get the code to work with color images as it currently only works with greyscale images. I have the main methods working however the filters only get applied to the top quarter of the returned images.
//In the heeder file.
inline uint8_t* operator[](const int rowIndex) {
return m_yptrs[rowIndex];
}
//in the .mm file
void Image::initYptrs() {
m_yptrs=(uint8_t **) malloc(sizeof(uint8_t *)*m_height);
for(int i=0; i<m_height; i++) {
m_yptrs[i]=m_imageData+i*m_width;
}
}
From my understanding it looks like it is creating a a reference to the pixels in the images however i don't understand this line of code.
m_yptrs[i]=m_imageData+i*m_width;
Thanks in advance.