To mount an ISO/IMG file in Linux (or your Raspberry PI), first information on the contents of the image must be found using the fdisk command:
Note the block size and start location of the partition you wish to mount.
mount the partition within the image to a location of your choice on
your local disk. Note you need to specify the offset, which is the start
location * the block size.
You can then modify the contents of the image partition. Note the
partition size is restricted (it won't just expand as you add to it):