Image edit generates various output sizes and result

I use gemini-2.0-flash-preview-image-generation for image edit of rooms.
Sometimes, i get various output size on images. Lets say i send in an 1024x768 image, i can get a portrait photo as output. How to get output the same size as input thru api?

Also now when using gemini-2.0-flash-preview-image-generation it often changes the image if i do an edit.
Any tips for that?

Hi @Matt3, Could you please let me know if you mentioned the desired size in the prompt.

If possible could you please share the few sample where the image got modified. Thank You.