HACKER Q&A
📣 a1371

Get base64 PNG image out of ChatGPT


I come to you HN with a curiosity. The other day I was playing with ChatGPT to make HTML code. Then I had a thought: "what if I ask ChatGPT to give me png base64 binary in an img tag?" I wanted to view it in the browser. Would it be an actual image?

So far my attempts have be futile. ChatGPT understands the idea, but what it outputs is either reduced like

Company logo

Or it gets too big, which I think hits some kind of max response size limit. Putting that code in an HTML file gives a `net::ERR_INVALID_URL`.

And finally, I know what Dalle2 is, in case you were wondering.


  👤 SonOfLilit Accepted Answer ✓
First of all, at least text-davinci-003 is great at doing base64 in its head (see e.g. https://gist.github.com/SonOfLilit/1efe2864d3803ea792c6632ad...).

However, it's really not good at visual stuff (try asking it to draw stuff in ascii art, it doesn't really understand how things look, even things that it can give you a good description of like Homer Simpson).

However, it's much easier to ask it to draw things with code. Or just SVG.

    Write an SVG drawing of Homer Simpson

    ```
    
    

    
    

    
    

    
    
    
    ```