Raspberry Pi SD Card Image is too big for another SD Card

When you work with SD cards from different producers you realize that although cards are marked as 8GB they actually differ with some small bytes. For example I have AData SD card which is 8GB but it is slightly bigger that 8GB Toshiba SD card. And when I try to save image produced on AData on Toshiba SD card I got error saying that there is not enough space on disk. In this short tutorial I will show you how to resize an Image file to fit to another SD card.