func (img *Image) Retrieve(buf *bytes.Buffer) {
	diskPath := Repository.dataPath(img.Source, fmt.Sprintf("%s.%s", img.Handle, "jpg"))
	if diskPath == "" {
		panic(fmt.Errorf("missing diskPath for image '%s'", img.Handle))
	}
	b, err := ioutil.ReadFile(diskPath)
	if err != nil {
		panic(err)
	}
	n, err := buf.Write(b)
	if n != len(b) {
		panic(fmt.Errorf("partial write to memory buffer"))
	}
}
// Retrieve fetches the bytes for this image and stores them in the provided buffer.
Retrieve fetches the bytes for this image and stores them in the provided buffer.
// Retrieve fetches the bytes for this image and stores them in the provided buffer .
func (img *Image) Retrieve(buf *bytes.Buffer) {
	diskPath := Repository.dataPath(img.Source, fmt.Sprintf("%s.%s", img.Handle, "jpg"))
	if diskPath == "" {
		panic(fmt.Errorf("missing diskPath for image '%s'", img.Handle))
	}
	b, err := ioutil.ReadFile(diskPath)
	if err != nil {
		panic(err)
	}
	n, err := buf.Write(b)
	if n != len(b) {
		panic(fmt.Errorf("partial write to memory buffer"))
	}
}
func ( img * Image ) Retrieve ( buf * bytes . Buffer ) { diskPath := Repository . dataPath ( img . Source , fmt . Sprintf ( " " , img . Handle , " " ) ) if diskPath == " " { panic ( fmt . Errorf ( " " , img . Handle ) ) } b , err := ioutil . ReadFile ( diskPath ) if err != nil { panic ( err ) } n , err := buf . Write ( b ) if n != len ( b ) { panic ( fmt . Errorf ( " " ) ) } }
Retrieve fetches the bytes for this image and stores them in the provided buffer.
Retrieve fetches the bytes for this image and stores them in the provided buffer .