potential bug when reallocating with same number of pixels but different dimensions, closes #3432
Merge pull request #3434 from kylemcdonald/fix-ofPixels-allocate

potential bug when reallocating