code: func (f *Fpdf) RegisterImageOptions(fileStr string, options ImageOptions) (info *ImageInfoType) {
  	info, ok := f.images[fileStr]
  	if ok {
  		return
  	}
  
  	file, err := os.Open(fileStr)
  	if err != nil {
  		f.err = err
  		return
  	}
  	defer file.Close()
  
  	// First use of this image, get info
  	if options.ImageType == "" {
  		pos := strings.LastIndex(fileStr, ".")
  		if pos < 0 {
  			f.err = fmt.Errorf("image file has no extension and no type was specified: %s", fileStr)
  			return
  		}
  		options.ImageType = fileStr[pos+1:]
  	}
  
  	return f.RegisterImageOptionsReader(fileStr, options, file)
  }
docs: // RegisterImageOptions registers an image, adding it to the PDF file but not
  // adding it to the page. Use Image() with the same filename to add the image
  // to the page. Note that Image() calls this function, so this function is only
  // necessary if you need information about the image before placing it. See
  // Image() for restrictions on the image and the "tp" parameters.