970_90

Wednesday, 15 June 2016

How to convert image to base64 encoding?

How to convert image to base64 encoding?

Question: How to convert image to base64 encoding?
$path = 'http://4.bp.blogspot.com/-tWZZEnbGXzo/Vnzt0H7cS7I/AAAAAAAABFg/pCJF3dIRay0/s1600/Hosted%2BField%2BIntegration%2B-%2BBraintree.png';
$imageType = pathinfo($path, PATHINFO_EXTENSION);
$imageData = base64_encode(file_get_contents($path));
echo $binaryData = 'data:image/' . $imageType . ';base64,' . $imageData;

Output

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAdUAAAEKCAYAAABE0c8NAAAABGdBTUEAALEQa0zv0AAAACBjSFJNAACHDwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAABD2lDQ1BpY20AACjPY2Bg4slJzi1mEmBgyM0rKQpyd1KIiIxSYL/DwMggycDMoMlgmZhcXOAYEODDgBN8uwZUDQSXdUFmMZAGuFJSi5OB9B8gjksuKCphYGCMAbK5y0sKQOwMIFskKRvMrgGxi4AOBLIngNjpEPYSsBoIewdYTUiQM5B9Bsh2SEdiJyGxofaCAHOyEQPVQUlqRQmIdnNiYACFKXpYIcSYxYDYmIGBaQlCLH8RA4PFV6D4BIRY0kwGhu2tDAwStxBiKgsYGPhbGBi2nU8uLSqDWi0FxKcZTzIns07iyOb+JmAvGihtovhRc4KRhPUkN9bA8ti32QVVrJ0bZ9Wsydxfe/nwS4P//wHeQVN9p6D8bgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAGN6VFh0UmF3IHByb2ZpbGUgdHlwZSBpcHRjAAB42j2LuxGAMAzFek/BCP48+yXj5EJDR8H+h48CqVEjue5ny/ERQ2LAMXEq2h+bttWLXWDBONPCYZUFkivZj3MAWBlVGVKuKi+JmhMaji8ZOQAAHsVJREFUeF7t3c+O3MadwPHqfQZZuirBjDeW9QQjQEi8l2h8UTaCfRJ0CDBCDAHSxcAGMLA6GMhBWEACHAUabA6KTlYSRBfNBAFiJwY0TzCSAs0g1nE10jv0/opN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HEVSzBm/aKF10EPJAAAEEENATiGVQ1NtEpbKmigVdr5uSEgIIIBC+QEzH9qBGqoxYw985KCECCCDQVCCmYDqNX31PVKpqHC4HN+26bIcAAgiEJRBjQA3unioBNqydgtIggAACTQViDaJFnyAv/zZtRLZDAAEEEEAgJIGgJiqFBENZEEAAAQQQWFaAoLqsGNsjgAACCCDgECCo0jUQQAABBBBQEiCoKkGSDAIIIIAAAgRV+gACCCCAAAJKAgRVJUiSQQABBBBAgKBKH0AAAQQQQEBJgKCqBEkyCCCAAAIIEFTpAwgggAACCCgJEFSVIEkGAQQQQAABgip9AAEEEEAAASUBgqoSJMkggAACCCBAUKUPIIAAAgggoCRAUFWCJBkEEEAAAQQIqvQBBBBAAAEElAQIqkqQJIMAAggggABBlT6AAAIIIICAkgBBVQmSZBBAAAEEECCo0gcQQAABBBBQEiCoKkGSDAIIIIAAAgRV+gACCCCAAAJKAgRVJUiSQQABBBBAgKBKH0AAAQQQQEBJgKCqBEkyCCCAAAIIEFTpAwgggAACCCgJEFSVIEkGAQQQQAABgip9AAEEEEAAASUBgqoSJMkggAACCCDw/ySjrV3B4wBxAAAAAElFTkSuQmCC




Question: How to display the binary image data in Browser?

echo '<img src="'.$binaryData.'" title="Dispaly image with binary data" />';



No comments:

Post a Comment