如何使用react js将Base64字符串的图像转换为blob?

问题描述 投票:0回答:1

我正在使用react-webcam捕获图片。我在Base 64中获得了捕获的图像。我想将其转换为Blob

  capture = () => {

    const imageSrc = this.webcam.getScreenshot();
    Blob imageFile = someFunction(imageSrc) // want this code
    this.setState({
      imgsource: imageFile 
    });
  };
java spring reactjs spring-boot
1个回答
0
投票

有很多方法可以解决这个问题。您可以查看以下解决方案:

© www.soinside.com 2019 - 2024. All rights reserved.