Google Bard Extracts Code From Images (PNG, JPEG, WebP)

4.7/5 - (8 votes)

Consider the following screenshot of a code snippet:

Let’s say I want to extract the code from the image. I don’t want to type it out. What can I do?

I just discovered that Google Bard has sufficient image recognition skills that you can upload images and ask it to extract the code from the image.

Step 1: Visit Bard

First, visit the website and create an account if you haven’t already. If you already have a Google account, this will take two minutes or less.

Step 2: Upload the Code Image (PNG, JPEG, WebP) Into a Prompt

Second, click the small + icon at the bottom of the page to upload your code screenshot

Then choose the code screenshot as a JPEG, PNG, or WebP file form your computer folder and click "Open".

Step 3: Enter Code Recognition Prompt

Now enter the prompt "Give me the code in the image" or a similar one in the prompting textbox and click submit on the bottom right of your chat window.

Step 4: Copy&Paste Code

Bard has figured out the code from the image! You can now copy and paste it easily by clicking the double paper icon πŸ“„ on the left of the output.

Fantastic, you can use Bard to recognize code (e.g., Python) in an image. That’s currently not natively integrated into ChatGPT!

If you want to stay updated with the current AI disruption, join 150k Finxters by downloading our cheat sheets:

Also, feel free to check out this article you’ll enjoy (I bet)! πŸ‘‡

πŸ’‘ Recommended: GPT-4 Code Interpreter – How to Run Python & Plot Data in ChatGPT