fix image painted
add c++ test image painted
Merge pull request #2418 from mapycz/fix-image-painted

fix image painted