You could create an initial image from an existing instance using lxc publish and then create a new instance from that image, modify it an lxc publish it again as a different image.
If you’re talking about compiling something using one image type and then copying the result into another instance based on a different image type, you could use lxc file copy to copy files from one instance to the host and then into another instance.