func qr_decoder_set_image_size(p _QrDecoderHandle, width, height, depth, channel int) _QrDecoderHandle {
	v := C.qr_decoder_set_image_size(C.QrDecoderHandle(p),
		C.int(width), C.int(height), C.int(depth), C.int(channel),
	)
	return _QrDecoderHandle(v)
}
///////////////////////////////////////////////////////////////////////

set source image size

ARGS:
QrDecoderHandle decoder: handler
int width:  pixel width of source image
int height: pixel height of source image
int depth:  image depth (bit par pixel; use OpenCV IPL_DEPTH_*)
int channel: number of image channel

RETURN:
QrDecoderHandle handle

NOTE:
This method provide same function as qr_decoder_open_with_image_size().
package qrcode
import "C"
import (
	"image"
	"image/color"
	"unsafe"
)
type (
	_CvPoint  C.CvPoint
	_CvBox2D  C.CvBox2D
	_IplImage C.IplImage
)
const (
	_IPL_DEPTH_8U = int(C.IPL_DEPTH_8U)
)
func newRGBIplImage(m image.Image) *_IplImage {
	b := m.Bounds()
	p := C.cvCreateImage(C.cvSize(C.int(b.Dx()), C.int(b.Dy())), C.IPL_DEPTH_8U, 3)
	pix := ((*[1 << 30]byte)(unsafe.Pointer(p.imageData)))[0 : b.Dx()*b.Dy()*3 : b.Dx()*b.Dy()*3]
	switch m := m.(type) {
	case *image.Gray:
		for y := b.Min.Y; y < b.Max.Y; y++ {
			off := 0
			for x := b.Min.X; x < b.Max.X; x++ {
				gray := m.GrayAt(x, y)
				pix[off+0] = gray.Y
				pix[off+1] = gray.Y
				pix[off+2] = gray.Y
				off += 3
			}
			pix = pix[int(p.widthStep):]
		}
	case *image.RGBA:
		for y := b.Min.Y; y < b.Max.Y; y++ {
			off := 0
			for x := b.Min.X; x < b.Max.X; x++ {
				rgba := m.RGBAAt(x, y)
				pix[off+0] = rgba.R
				pix[off+1] = rgba.G
				pix[off+2] = rgba.B
				off += 3
			}
			pix = pix[int(p.widthStep):]
		}
	default:
		for y := b.Min.Y; y < b.Max.Y; y++ {
			off := 0
			for x := b.Min.X; x < b.Max.X; x++ {
				rgba := color.RGBAModel.Convert(m.At(x, y)).(color.RGBA)
				pix[off+0] = rgba.R
				pix[off+1] = rgba.G
				pix[off+2] = rgba.B
				off += 3
			}
			pix = pix[int(p.widthStep):]
		}
	}
	return (*_IplImage)(p)
}
func (p *_IplImage) Release() {
	C.cgoReleaseIplImage((*C.IplImage)(p))
}
const (
	_QR_IMAGEREADER_WORKING = int(C.QR_IMAGEREADER_WORKING)  
	_QR_IMAGEREADER_DECODED = int(C.QR_IMAGEREADER_DECODED)  
	_QR_VERSIONINFO_ERROR         = int(C.QR_VERSIONINFO_ERROR)          
	_QR_VERSIONINFO_INVALID       = int(C.QR_VERSIONINFO_INVALID)        
	_QR_VERSIONINFO_MISMATCH      = int(C.QR_VERSIONINFO_MISMATCH)       
	_QR_VERSIONINFO_UNRECOVERABLE = int(C.QR_VERSIONINFO_UNRECOVERABLE)  
	_QR_FORMATINFO_ERROR         = int(C.QR_FORMATINFO_ERROR)          
	_QR_FORMATINFO_INVALID_LEVEL = int(C.QR_FORMATINFO_INVALID_LEVEL)  
	_QR_FORMATINFO_UNRECOVERABLE = int(C.QR_FORMATINFO_UNRECOVERABLE)  
	_QR_CODEDATA_ERROR           = int(C.QR_CODEDATA_ERROR)            
	_QR_CODEDATA_NOT_SUPPORT_ECI = int(C.QR_CODEDATA_NOT_SUPPORT_ECI)  
	_QR_CODEDATA_LENGTH_MISMATCH = int(C.QR_CODEDATA_LENGTH_MISMATCH)  
	_QR_CODEDATA_UNRECOVERABLE   = int(C.QR_CODEDATA_UNRECOVERABLE)    
	_QR_IMAGEREADER_ERROR                      = int(C.QR_IMAGEREADER_ERROR)                       
	_QR_IMAGEREADER_NOT_INVALID_SRC_IMAGE      = int(C.QR_IMAGEREADER_NOT_INVALID_SRC_IMAGE)       
	_QR_IMAGEREADER_NOT_FOUND_FINDER_PATTERN   = int(C.QR_IMAGEREADER_NOT_FOUND_FINDER_PATTERN)    
	_QR_IMAGEREADER_NOT_FOUND_CODE_AREA        = int(C.QR_IMAGEREADER_NOT_FOUND_CODE_AREA)         
	_QR_IMAGEREADER_NOT_DETERMINABLE_CODE_AREA = int(C.QR_IMAGEREADER_NOT_DETERMINABLE_CODE_AREA)  
)
const (
	_QR_LEVEL_M = int(C.QR_LEVEL_M)  
	_QR_LEVEL_L = int(C.QR_LEVEL_L)  
	_QR_LEVEL_H = int(C.QR_LEVEL_H)  
	_QR_LEVEL_Q = int(C.QR_LEVEL_Q)  
)
const (
	_QR_MODE_NUMBER   = int(C.QR_MODE_NUMBER)    
	_QR_MODE_ALPHABET = int(C.QR_MODE_ALPHABET)  
	_QR_MODE_JOINT    = int(C.QR_MODE_JOINT)     
	_QR_MODE_8BIT     = int(C.QR_MODE_8BIT)      
	_QR_MODE_FNC1_1   = int(C.QR_MODE_FNC1_1)    
	_QR_MODE_ECI      = int(C.QR_MODE_ECI)       
	_QR_MODE_KANJI    = int(C.QR_MODE_KANJI)     
	_QR_MODE_FNC1_2   = int(C.QR_MODE_FNC1_2)    
)
type (
	_QrDecoderHandle C.QrDecoderHandle
	_QrCodeHeader    C.QrCodeHeader
)
const (
	_DEFAULT_ADAPTIVE_TH_SIZE  = int(C.DEFAULT_ADAPTIVE_TH_SIZE)   
	_DEFAULT_ADAPTIVE_TH_DELTA = int(C.DEFAULT_ADAPTIVE_TH_DELTA)  
)
func qr_decoder_open() _QrDecoderHandle {
	p := C.qr_decoder_open()
	return _QrDecoderHandle(p)
}
func qr_decoder_open_with_image_size(width, height, depth, channel int) _QrDecoderHandle {
	p := C.qr_decoder_open_with_image_size(
		C.int(width), C.int(height), C.int(depth), C.int(channel),
	)
	return _QrDecoderHandle(p)
}
func qr_decoder_close(p _QrDecoderHandle) {
	C.qr_decoder_close(C.QrDecoderHandle(p))
}
func qr_decoder_get_status(p _QrDecoderHandle) int {
	v := C.qr_decoder_get_status(C.QrDecoderHandle(p))
	return int(v)
}
func qr_decoder_is_busy(p _QrDecoderHandle) int {
	v := C.qr_decoder_is_busy(C.QrDecoderHandle(p))
	return int(v)
}