My SD card corrupted itself but I have a back up image.
The partition table leave 1GB unallocated space at the end so that I can restore to any 8GB memory card regardless of memory fluctuations.
The actual img file is 8GB. How can I shrink this down to ignore the extra space at the end so that I can write it onto a slightly smaller memory card?