Пример #1
0
func (this *FormatProcessor) Process(img *img4g.Image) error {
	log.WithFields(log.Fields{
		"format": this.Format,
	}).Debug("process format")
	err := img.SetFormat(this.Format)
	return err
}
Пример #2
0
func (this *FormatProcessor) Process(img *img4g.Image) error {
	l4g.Debug("process format")
	var err error
	tran := this.Cat.NewTransaction(Image, "Format")
	defer func() {
		tran.SetStatus(err)
		tran.Complete()
	}()
	err = img.SetFormat(this.Format)
	return err
}