The quality method was checking if image responded to :quality=, which will always fail. Quality is now set via the writer format options instance variable. Currently, it assumes that the only format to accept quality is jpeg, checking that either the original file format or conversion format are jpeg before setting the format options variable.
Makes hash 1.8 compatible.