No sure where the problem is, but when a large image is used 3000x2000 than the result is just a cropped portion of the original In my implementation it was happening too, so i wanted to give yours a try, but the the same problem there