code: func (info *ImageInfoType) GobEncode() (buf []byte, err error) {
  	fields := []interface{}{info.data, info.smask, info.n, info.w, info.h, info.cs,
  		info.pal, info.bpc, info.f, info.dp, info.trns, info.scale, info.dpi}
  	w := new(bytes.Buffer)
  	encoder := gob.NewEncoder(w)
  	for j := 0; j < len(fields) && err == nil; j++ {
  		err = encoder.Encode(fields[j])
  	}
  	if err == nil {
  		buf = w.Bytes()
  	}
  	return
  }
docs: // GobEncode encodes the receiving image to a byte slice.