为什么base64编码中没有<?>等对应的字符,但是我在网上base64进行编码解码实验的时候,如:对<?php?>进行base64编码,依然能得出正确的base64码,且能正确解码出来



为什么base64编码中没有<?>等对应的字符,但是我在网上base64进行编码解码实验的时候,如:对<?php?>进行base64编码,依然能得出正确的base64码,且能正确解码出来



关注【相关推荐】
import cv2 # pip install opencv-python
# base64字符串解码为二进制流
def get_bytes_from_base64(img_base64):
return base64.b64decode(img_base64.encode())
img = get_bytes_from_base64(img_base64)
img_array = np.frombuffer(img, np.uint8)
img_cv = cv2.imdecode(img_array, cv2.COLOR_RGBA2RGB)
得到GBR三通道的ndarray像素数组