This commit is contained in:
danil_e71
2020-07-17 13:40:03 +03:00
parent 1f7f807dfb
commit bc2782a693
10 changed files with 32950 additions and 8 deletions

View File

@@ -31,7 +31,7 @@ func CreateEncoder() (*Encoder, error) {
func (e *Encoder) Encode(image []byte, param *Param, paramImage *ParamImage) (data []byte, err error) {
size := C.int(0)
result := C.encode(e.encoder, param.param, paramImage.param, (*C.uchar)(unsafe.Pointer(&image[0])), &size)
C.fflush(C.stdout)
if size == C.int(0) {
return nil, errors.New("Can't encode")
}