Height / Width 0 Fix

Make sure that we only check for Width only if the Height is set to 0 or check for Height only if the Width to 0. Otherwise the images will be copied and resize all over again as the Width or Height will never match if their counterpart is set to 0.