How to detect transparent area in image