Try creating a few trivial images, eg 1 pixel, 7 x 8, and so on.

|Most likely the problem is that you haven't got row and col correct, or the image itself is defective.