Use enum names, not integers directly

Conflicts:
	src/views/view.c
initialize image height and width from exif data
(cherry picked from commit 0e99ef97e6dd6a45ef3f2ef7f1fe05e4efbf729e)
thumbnails: don't crash if there is no exif thumb.
(cherry picked from commit c9206f38535238ea39ff0f56df2bf8f97ae08948)
thumbnails: remove black rims from canon thumbs
(cherry picked from commit 5ea65b06fee502dcf09284ea9a2a3ae4f720e79d)
thumbnails: avoid upsampling small embedded thumbs
(cherry picked from commit 0db16375f2a446449a81c72a882fc52659070ce2)