Also fixed the same error in generate GPencil object from image. The problem was the Render Result image hasn't ibuf.