| | |
| | | ) |
| | | |
| | | // SrcFormat format |
| | | const srcFormat = 23 |
| | | const SrcFormat = 23 |
| | | |
| | | // DstFormat format |
| | | const DstFormat = 3 |
| | | |
| | | // GoConv conv |
| | | type GoConv struct { |
| | |
| | | |
| | | // NewConv new conv |
| | | func NewConv(srcW, srcH, dstW, dstH, scaleFlag int) *GoConv { |
| | | c := C.wrap_fn_create_conv(C.int(srcW), C.int(srcH), C.int(srcFormat), C.int(dstW), C.int(dstH), C.int(scaleFlag)) |
| | | c := C.wrap_fn_create_conv(C.int(srcW), C.int(srcH), C.int(SrcFormat), |
| | | C.int(dstW), C.int(dstH), C.int(DstFormat), C.int(scaleFlag)) |
| | | |
| | | if c == nil { |
| | | return nil |
| | |
| | | } |
| | | |
| | | // NewResizer resize |
| | | func NewResizer(srcW, srcH, dstW, dstH int) *GoConv { |
| | | c := C.wrap_fn_create_conv(C.int(srcW), C.int(srcH), C.int(srcFormat), C.int(dstW), C.int(dstH), ScaleNone) |
| | | func NewResizer(srcW, srcH, format, dstW, dstH int) *GoConv { |
| | | c := C.wrap_fn_create_conv(C.int(srcW), C.int(srcH), C.int(format), C.int(dstW), C.int(dstH), C.int(format), ScaleNone) |
| | | |
| | | if c == nil { |
| | | return nil |