code: func InternalImageSize(x int) int {
  	if x <= 0 {
  		panic("graphics: x must be positive")
  	}
  	if x < minInternalImageSize {
  		return minInternalImageSize
  	}
  	r := 1
  	for r < x {
  		r <<= 1
  	}
  	return r
  }
docs: // InternalImageSize returns a nearest appropriate size as an internal image.