MCPcopy Create free account
hub / github.com/PyImageSearch/imutils / base64_encode_image

Function base64_encode_image

imutils/encodings.py:7–12  ·  view source on GitHub ↗
(a)

Source from the content-addressed store, hash-verified

5import sys
6
7def base64_encode_image(a):
8 # return a JSON-encoded list of the base64 encoded image, image data
9 # type, and image shape
10 #return json.dumps([base64_encode_array(a), str(a.dtype), a.shape])
11 return json.dumps([base64_encode_array(a).decode("utf-8"), str(a.dtype),
12 a.shape])
13
14def base64_decode_image(a):
15 # grab the array, data type, and shape from the JSON-decoded object

Callers

nothing calls this directly

Calls 1

base64_encode_arrayFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…