Fixing the flaw in digital images