Apply @uobikiemukot's patch (various pixel-format support)
https://gist.github.com/uobikiemukot/7adab29310caf0be6f7a
Swap bytes if depth == 2
Keep compatibility
Merge pull request #8 from saitoha/fix-segfault-with-introducing-various-pixformat

Keep compatibility
@uobikiemukot's patch in the conversation of #8
Merge branch 'feature-support-various-pixformat' of github.com:saitoha/libsixel into feature-support-various-pixformat
Merge branch 'master' into release
Merge branch 'master' into feature-support-various-pixformat

Conflicts:
	converters/img2sixel.c
	include/sixel.h.in
	src/tosixel.c
Merge branch 'hotfix-preventing-double-free' into feature-support-various-pixformat
Merge branch 'master' into release
Merge branch 'master' into release
Added command line options to use XTERM palettes.
Support 15bpp color sixel. (-F option)
Merge branch 'master' into release-1.4
Replace indent tabs to spaces.
Remove a trailing space.
Add sixel_dither_unref() before return (-1).
Separate sixel_encode_impl() into sixel_encode_header(), sixel_encode_body() and
sixel_encode_footer().
Remove unnecessary check. (nwrite <= 0)
Merge branch 'arakiken' into arakiken-separate-sixel-encode-impl
Fix a typo of API signature(#10). old one is still remained.