How to edit images with Gemini
06-Sep-2025 299
This post looks at how we can edit an image with Gemini and llm.rb. Our plan is to edit an image to be a little silly by adding a cowboy hat into the mix. The llm.rb library supports both image generation (with a prompt) and image editing (also done with a prompt) plus much more that we won’t cover here. Let’s get started 😃
Placeholder
We don’t want to offend anybody or cross any red lines, so the first step we will take is to generate a placeholder image on the fly. This will allow us to follow up and edit the image by adding a cowboy hat as mentioned earlier. Let’s generate a single image, and save it to use later:.
How to edit images with Gemini #ruby #rubydeveloper #rubyonrails #images #Gemini #gemini https://rubyonrails.ba/link/how-to-edit-images-with-gemini