Lines Matching refs:stride
73 let stride = imgComponent.rowStride; // 获取图片的stride
74 console.debug(`getComponent with width:${width} height:${height} stride:${stride}`);
75 // stride与width一致
76 if (stride == width) {
82 // stride与width不一致
86 const srcBuf = new Uint8Array(imgComponent.byteBuffer, j * stride, width)
111 方式一:去除imgComponent.byteBuffer中stride数据,拷贝得到新的buffer,调用不支持stride的接口处理buffer。
120 const srcBuf = new Uint8Array(imgComponent.byteBuffer, j * stride, width);
128 方式二:根据stride*height创建pixelMap,然后调用pixelMap的cropSync方法裁剪掉多余的像素。
131 // 创建pixelMap,width宽传行距stride的值
133 size:{height: height, width: stride}, srcPixelFormat: 8});
138 方式三:将原始imgComponent.byteBuffer和stride信息一起传给支持stride的接口处理。
275 let stride = imgComponent.rowStride; // 获取图片的stride
276 console.debug(`getComponent with width:${width} height:${height} stride:${stride}`);
277 // stride与width一致
278 if (stride == width) {
284 // stride与width不一致
288 const srcBuf = new Uint8Array(imgComponent.byteBuffer, j * stride, width)