func (s *StegImage) WriteNewImageToFile(imgPath string) (err error) {
	myfile, _ := os.Create(imgPath)
	defer myfile.Close()

	enc := png.Encoder{CompressionLevel: png.BestCompression}
	err = enc.Encode(myfile, s.newImg)
	if err != nil {
		log.Error(err)
	}

	return err
}
// WriteNewImageToFile outputs the image held in StegImage.newImg to
// the imgPath given
WriteNewImageToFile outputs the image held in StegImage.newImg to
the imgPath given
// WriteNewImageToFile outputs the image held in StegImage . newImg to // the imgPath given
func (s *StegImage) WriteNewImageToFile(imgPath string) (err error) {
	myfile, _ := os.Create(imgPath)
	defer myfile.Close()
	enc := png.Encoder{CompressionLevel: png.BestCompression}
	err = enc.Encode(myfile, s.newImg)
	if err != nil {
		log.Error(err)
	}
	return err
}
func ( s * StegImage ) WriteNewImageToFile ( imgPath string ) ( err error ) { myfile , _ := os . Create ( imgPath ) defer myfile . Close ( ) enc := png . Encoder { CompressionLevel : png . BestCompression } err = enc . Encode ( myfile , s . newImg ) if err != nil { log . Error ( err ) } return err }
WriteNewImageToFile outputs the image held in StegImage.newImg to
the imgPath given
WriteNewImageToFile outputs the image held in StegImage . newImg to the imgPath given