If you want to backup e.g. your Raspberry Pi SD card, most internet tutorials recommend Win32DiskImager for Windows users.
This one was fine when SD card’s common sizes were 4GB or lower. E.g. with a 16 GB SD card, backup or recovery might take half an hour or longer.
It is possible to shrink raw .img files using GParted or Linux in general, but it is not a really convenient way.
One good alternative is to use Acronis True Image.
You simply choose to backup your SD card drive (which contains a FAT and an Ext4 partition), set a destination and start the backup.
E.g. a 16 GB SD card with OpenELEC (Kodi) installed would result in a 16 GB image file by default, but Acronis’s image file is about 250 MB and takes less than 5 minutes to create (or restore).
Another benefit of this shrinked image file is that you can restore it on other SD cards with lower file space capacities.
Another alternative could be Paragon Backup. There is also a free version, but I have not tested Paragon yet.