Phone [Q] Extract and repack system.img file?

Does anyone know how to extract and repack system.img file that comes from factory image KTU84P?

I've been using windows 7, should i use ubuntu?