How to send image to Google Gemini for processing?

zmike

Client
Регистрация
24.10.2019
Сообщения
155
Благодарностей
10
Баллы
18
How to convert the image into base64 and send it to Google Gemini API for processing?
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 913
Благодарностей
1 200
Баллы
113
Hi, use API or any form Gemini has, I dont know about that, but you can convert image easily with C#

C#:
byte[] imageArray = System.IO.File.ReadAllBytes(@"image file path");
string base64ImageRepresentation = Convert.ToBase64String(imageArray);
 

zmike

Client
Регистрация
24.10.2019
Сообщения
155
Благодарностей
10
Баллы
18
I managed to send the photo to gemini via API, and get its output to get the x, y coordinates of the button.
But the button location seems to be wrong.

Does anyone have experience using AI to determine clicking coordinates? (do a screenshot of instance, then send this screenshot to AI to ask x, y coordinates to click)
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)