code: def _get_image_size(self, maxcharno, maxlineno):
          
          return (self._get_char_x(maxcharno) + self.image_pad,
                  self._get_line_y(maxlineno + 0) + self.image_pad)
docs: Get the required image size.