将base64验证码图片保存到本地

Posted gylianger

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了将base64验证码图片保存到本地相关的知识,希望对你有一定的参考价值。

图片格式:

data:image/jpeg;base64, /9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABGAKADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDsfHHjnS/BOjKzrLNJK7fY7INsmt5Vxn5sEBAG9/vAAFTx5xp/xJ+J3iW4ku9I0C2lgljfzUjtGMVwqjafvN8zDIHykHoPaqP7QNrfDxXpd9OyTWs1iIoLq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xkIwtzE27CyAdxtPI6dR1IpiBZFsVRnS2vV32pGBJavsLYU9NuARjt05BwCigBskrx2t5dyJE32ZjHfQhf3dwAoO4A9GwR19MHgAidoJlvhZC4PnrG01rcnlwoIBjf+8uSPr9QDRRQBCrq9rFcGMC1uZ/Jltwf9VL5mzzIz2+bnt/e4OcyBbkT3EYkRry0RWMhGFuYm3YWQDuNp5HTqOpFFFADECyLYqjOltervtSMCS1fYWwp6bcAjHbpyDgNkleO1vLuRIm+zMY76EL+7uAFB3AHo2COvpg8AEFFAH//2Q==

 

转换为本地图片:

 public void Base64ToImg(string base64Code, string path, string fileName)
        {
            try
            {
                using (MemoryStream stream = new MemoryStream(Convert.FromBase64String(base64Code)))
                {
                    if (!Directory.Exists(path))
                    {
                        Directory.CreateDirectory(path);
                    }
                    var bitmap = new Bitmap(stream);
                    bitmap.Save(path + fileName);
                }
            }
            catch (Exception ex)
            {
                Logger.LOG_ERROR.Error("将验证码保存为本地图片异常! base64Code=" + base64Code + " path=" + path + " fileName=" + fileName, ex);
            }
        }

PS:方法中baseCode参数只需要传递“data:image/jpeg;base64, ”后面的内容!

 

    

data:image/jpeg;base64, /9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABGAKADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWW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E3FbW9YZaI5x5UoPJHGOcZ6cMASATtBMt8LIXB89Y2mtbk8uFBAMb/AN5ckfX6gGoVdXtYrgxgWtzP5MtuD/qpfM2eZGe3zc9v73BzkooAkC3InuIxIjXloisZCMLcxNuwsgHcbTyOnUdSKYgWRbFUZ0tr1d9qRgSWr7C2FPTbgEY7dOQcAooAbJK8dreXciRN9mYx30IX93cAKDuAPRsEdfTB4AInaCZb4WQuD56xtNa3J5cKCAY3/vLkj6/UA0UUAQq6vaxXBjAtbmfyZbcH/VS+Zs8yM9vm57f3uDnMgW5E9xGJEa8tEVjIRhbmJt2FkA7jaeR06jqRRRQAxAsi2KozpbXq77UjAktX2FsKem3AIx26cg4DZJXjtby7kSJvszGO+hC/u7gBQdwB6Ngjr6YPABBRQBO0Ey3wshcHz1jaa1uTy4UEAxv/AHlyR9fqAahV1e1iuDGBa3M/ky24P+ql8zZ5kZ7fNz2/vcHOSigCQLcie4jEiNeWiKxkIwtzE27CyAdxtPI6dR1IpiBZFsVRnS2vV32pGBJavsLYU9NuARjt05BwCigBskrx2t5dyJE32ZjHfQhf3dwAoO4A9GwR19MHgAidoJlvhZC4PnrG01rcnlwoIBjf+8uSPr9QDRRQBCrq9rFcGMC1uZ/Jltwf9VL5mzzIz2+bnt/e4OcyBbkT3EYkRry0RWMhGFuYm3YWQDuNp5HTqOpFFFADECyLYqjOltervtSMCS1fYWwp6bcAjHbpyDgNkleO1vLuRIm+zMY76EL+7uAFB3AHo2COvpg8AEFFAH//2Q==

以上是关于将base64验证码图片保存到本地的主要内容,如果未能解决你的问题,请参考以下文章

PHP将Base64图片转换为本地图片并保存

PHP将Base64图片转换为本地图片并保存

golang包快速生成base64验证码

java 模拟登陆带验证码的网页,就想知道怎么将验证码以图片的形式下载到本地。。。。。

nvue- 加载本地图片

Java如何获取图片验证码保存