It'll work just fine. I use a 1200watt Inverter in my Motorhome and it runs several PC's/Mac's, TV, etc.
Buy an inverter advertised for Notebooks that has the capacity of double the iMac. Normal capacity, not surge. The inverter should list both. If it doesn't look for another. The surge capacity will take care of the iMac at start-up. The reason for doubling (as a minimum) is so that the Inverter runs reasonably cool.
Let me re-define doubling, try to keep the inverted at 50-70% load for constant running. It will be cool and quite. Cool is different for all, it simply won't be so hot as to endanger surrounding stuffs.
As running the 1200 is sometimes a waste of precious battery power I sometimes revert to a 400 watt and even a 100 when running just laptop.
Enjoy. Some pitfalls to watch out for is inverter noise. Make sure it's quiet and and has no annoying side-effects, like constant buzzing. It will make a soft noise that is unobtrusive but I've come across some that vere unusable (for me) due to noise.
Of course compared to running the generator it'll be quite anyways 🙂
G5/G4/1.25 MDD, 1ghzTiG4 & ViPod, iSight-iMac, Mini Duo, MBPro17 Mac OS X (10.4.7) Dual booting the Mini/MBP17