Fix deprecation warnings from ofImage.cpp, and cache the pixel data pointer.
Merge pull request #3410 from nneonneo/ofImage-fix

Fix deprecation warnings from ofImage.cpp