github.com/cellofellow/gopkg@v0.0.0-20140722061823-eec0544a62ad/image/jxr/writer.go (about)

     1  // Copyright 2014 <chaishushan{AT}gmail.com>. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package jxr
     6  
     7  import (
     8  	"errors"
     9  	"image"
    10  	"io"
    11  
    12  	"github.com/chai2010/gopkg/image/convert"
    13  )
    14  
    15  // Encode writes the image m to w in JPEG/XR format.
    16  func Encode(w io.Writer, m image.Image, opt *Options) error {
    17  	if opt != nil && opt.ColorModel != nil {
    18  		m = convert.ColorModel(m, opt.ColorModel)
    19  	}
    20  	return errors.New("jxr: Encode, unsupported")
    21  }