Use constants for jpeg subsampling names and components;
Simple string comparison instead of iequals;
Match jpeg reader subsampling values to predefined values and set attribute