Dividing sprites and checking for empty ones

So I have a sprite. I would like to divide this sprite into 5×5 sprites. Now what I am confused with is how I can go through each of these sprites and check if a sprite is completely empty/no pixels then remove that sprite

This is my code for diving the sprite https://gdl.space/eyulagofon.cpp