La imagen es una que he convertido a base64 con esta utilidad http://duri.me/
Este es mi codigo:
Código PHP:
Ver original
<?php $string="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QBaRXhpZgAATU0AKgAAAAgABQMBAAUAAAABAAAASgMDAAEAAAABAAAAAFEQAAEAAAABAQAAAFERAAQAAAABAAAOxFESAAQAAAABAAAOxAAAAAAAAYagAACxj//bAEMAAgEBAgEBAgICAgICAgIDBQMDAwMDBgQEAwUHBgcHBwYHBwgJCwkICAoIBwcKDQoKCwwMDAwHCQ4PDQwOCwwMDP/bAEMBAgICAwMDBgMDBgwIBwgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDP/AABEIABwAIgMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2gAMAwEAAhEDEQA/APyo8R+Hrnwn4gutOu4mhvLCd7edWHKOjFWB/EGrdmWivIJRnDjHB5HvX01/wWS+A3/Cmv25PEc1pEIdM8WKut2uFwhMv+sA+kgb86+ZLeMPagbgSvb0r8OyrNKeZZfRx1PapFP0utV8nofRYzCfU8bOj2enpuvwP6Mf2FfjUvxp/YH8C+JpHD3I0ZbG7OckTW/7ps/98g/jXL/B3UhbeLry5LZ2rI59stmvnT/ggb8ZF8S/ss/ELwJcTjzvDd0uqWqMeRDOhV/w3p+te2+A1uLp9WitFLTvEQuO/wA1fybQyuGWcdwo1Pdgq8Guyi5Jr8GfreX1fbZJiJRV24v7+X/PQ9n/AOE9RufNHPPWivJTaaopwQ+RRX+qMOMcu5V++j/4Ej+PJcPYvmf7qX3P/I+T/wDguN8LD8Rv2ZvA/wARreIPeeH7k6deOOT5M4BXPsHX/wAer8urVAfMBAII45xzX7h/tGeHLTxp/wAE4PiBZ6jH58MOiS3cfPKSRMGQg+xUV+INiAZ1GB868nvX8G+C2aTr5DPCz/5c1JRXo/eX3Ns/pTj3CRpY+FWP2lr+H6M+r/8Agjx8eh8G/wBrK0s55vL03xbZy6JdAtxmRcxE/RwPzNfqT8A7ZpPE18xJDQg5I+p4r8K/hPqs+i+ONMvLZ/KuLa8jeNh/CRIMGv3x/ZUtE1HSby7lGZpmBYjgHKg/zr4Dxxwaw+LpY2k7SnG3zi1r9zt8j6bgjFP6jUg/sv8ABo6eWIGRj5IPJ/hortv7Mg/55J+VFfgX9s5r/wBBEvvZ9P7Sh/z7X3I//9k="; if($img != false) { } ?>
Mi problema es que por lo visto $img = imagecreatefromstring(base64_decode($string)) no esta funcionando dado que nunca entra en :
Código PHP:
Ver original
if($img != false) { }
Y evidentemente no se guarda la imagen , pero tampoco da error, cuál podria ser el problema?
Gracias!