Thank you dop2000 for your reply.
The solution provided appears to be highly dependent on specific images and the player's brush will fill everything that's opacity is set to 0 in one continuous skroke, therefore does not meet the requirements of the problem at hand.
It is my understanding that a more suitable approach may involve the use of a flood-fill algorithm, which I believe may provide a more appropriate solution to the problem.