Support 'valign' and 'halign' attributes on non-thumb images.

Change-Id: Ia2bfbc6cf473d749bab3f7871fa7584dc1631f68
Merge "Support 'valign' and 'halign' attributes on non-thumb images."