Snippets tagged “base64”
9 snippets use this tag.
- Base64 Java encode and decode a stringJava
To encode and decode a string in Base64 in Java, you can use the java.util.Base64 class.
- Convert Base64 string to an image file?PHP
To convert a Base64 string to an image file in PHP, you can use the base64_decode() function to decode the Base64 string and then save it as an image file using file_put_contents().
- Decode Base64 data in JavaJava
To decode base64 data in Java, you can use the Base64.Decoder class introduced in Java 8. Here's an example of how to use it:
- Encoding as Base64 in JavaJava
To encode a string as Base64 in Java, you can use the java.util.Base64 class. Here's an example of how you can use the Base64 class to encode a string:
- How to convert an image to Base64 encodingPHP
To convert an image to base64 encoding in PHP, you can use the base64_encode() function
- How to Convert the Image into a Base64 String Using JavaScriptJavaScript
Read this tutorial and learn several methods of converting an image to a Base64 string using JavaScript. Choose the right approach for you and try examples.
- How to Display Base64 Images in HTMLHTML
In this snippet, we’re going to demonstrate how you can display Base64 images in HTML. Use the HTML <img> element to embed Base64 encoded image into HTML.
- How to Encode and Decode Strings with Base64 in JavaScriptJavaScript
Read this tutorial and learn useful information about two JavaScript built-in functions which are used to convert a string to and from base64 encoding.
- PHP - get base64 img string decode and save as jpg (resulting empty image )PHP
To decode a base64 encoded image string and save it as a JPG file in PHP, you can use the following code: