Update handler.py
Browse files71 unmodified lines727374757677787980818271 unmodified linesclothes = img[y1: y2, x1: x2]clothes = cv2.cvtColor(clothes, cv2.COLOR_BGR2RGB)retval , buffer = cv2.imencode('.jpg', clothes)im_bytes = buffer.tobytes()# cv2.imwrite("result.jpg", clothes)# create base 64 objectjpg_as_text = base64.b64encode(im_bytes).decode("utf-8") # Decode bytes to string")# base64_encoded = base64.b64encode(image_bytes).decode("utf-8")# Get the image format71 unmodified lines727374757677787980818271 unmodified linesclothes = img[y1: y2, x1: x2]clothes = cv2.cvtColor(clothes, cv2.COLOR_BGR2RGB)retval , buffer = cv2.imencode('.jpg', clothes)# im_bytes = buffer.tobytes()# cv2.imwrite("result.jpg", clothes)# create base 64 objectjpg_as_text = base64.b64encode(buffer).decode("utf-8") # Decode bytes to string")# base64_encoded = base64.b64encode(image_bytes).decode("utf-8")# Get the image format
handler.py+2-2