Debugging error appears in the instance of ofImage function

I am studying books about openframeworks.

I am having trouble with an error in the sample code that appears in that book.

Is it because the sample of the book is old?

Please teach me.

yes that code is old and won’t compile anymore.

unsigned char * pixels = image.getPixels();

should now be:

ofPixels & pixels = image.getPixels();

and image.width and height is now image.getWidth() and image.getHeight()

It went well.
Thank you very much.