UsingNet / nvjpeg-python

nvjpeg for python
MIT License
93 stars 24 forks source link

why use more CPU than opencv #18

Open nistarlwc opened 1 year ago

nistarlwc commented 1 year ago

save some image.

img = cv2.imread(img_file, cv2.IMREAD_COLOR)   
nj_jpg = nj.encode(img, 100)   
fp = open(output_img_path, "wb")   
fp.write(nj_jpg)   
fp.close()

if use cv2.imwrite only use 14% CPU, but nvjpeg use 26% CPU