Skip to content

Commit

Permalink
Merge branch 'release-1.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
saitoha committed Feb 28, 2015
2 parents 7efd9a4 + 2a25d1c commit 7f73585
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 29 deletions.
22 changes: 22 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
2015-02-28 Hayaki Saito <user@zuse.jp>

* configure, configure.ac, package.json: Update package version to 1.4.9

* converters/loader.c: Workaround for libpng 1.2 with grayscale-alpha PNG
(for Issue #36)

2015-02-27 saitoha <user@zuse.jp>

* converters/loader.c: Workaround for libpng 1.2 (for Issue #34)

2015-02-25 Hayaki Saito <user@zuse.jp>

* Makefile.in, converters/loader.c: Fix broken -p option with 8bpp grayscale
PNG (concerned with Issue #34)

* Makefile.in, converters/loader.c: Fix broken -p option with 8bpp grayscale
PNG (concerned with Issue #34)

* converters/loader.c: Fix broken resize option(-w/-h) with 1/2/4bpp
grayscale png (for Issue #34)

2015-02-18 Hayaki Saito <user@zuse.jp>

* converters/loader.c: Call png_set_strip_alpha() when expanding paletted PNG
Expand Down
20 changes: 10 additions & 10 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for sixel 1.4.5.
# Generated by GNU Autoconf 2.69 for sixel 1.4.9.
#
# Report bugs to <user@zuse.jp>.
#
Expand Down Expand Up @@ -589,8 +589,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='sixel'
PACKAGE_TARNAME='sixel'
PACKAGE_VERSION='1.4.5'
PACKAGE_STRING='sixel 1.4.5'
PACKAGE_VERSION='1.4.9'
PACKAGE_STRING='sixel 1.4.9'
PACKAGE_BUGREPORT='user@zuse.jp'
PACKAGE_URL=''

Expand Down Expand Up @@ -1371,7 +1371,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures sixel 1.4.5 to adapt to many kinds of systems.
\`configure' configures sixel 1.4.9 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1441,7 +1441,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of sixel 1.4.5:";;
short | recursive ) echo "Configuration of sixel 1.4.9:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1581,7 +1581,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
sixel configure 1.4.5
sixel configure 1.4.9
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -1996,7 +1996,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by sixel $as_me 1.4.5, which was
It was created by sixel $as_me 1.4.9, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
Expand Down Expand Up @@ -2939,7 +2939,7 @@ fi

# Define the identity of the package.
PACKAGE='sixel'
VERSION='1.4.5'
VERSION='1.4.9'


cat >>confdefs.h <<_ACEOF
Expand Down Expand Up @@ -15365,7 +15365,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by sixel $as_me 1.4.5, which was
This file was extended by sixel $as_me 1.4.9, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -15431,7 +15431,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
sixel config.status 1.4.5
sixel config.status 1.4.9
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

AC_PREREQ([2.60])
LT_PREREQ([2.4])
AC_INIT([sixel], [1.4.5], [user@zuse.jp])
AC_INIT([sixel], [1.4.9], [user@zuse.jp])
LS_LT_CURRENT=1
LS_LT_REVISION=3
LS_LT_AGE=0
Expand Down
45 changes: 28 additions & 17 deletions converters/loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ get_chunk_from_url(char const *url, chunk_t *pchunk)
return 0;
}
# endif /* HAVE_LIBCURL */


# if HAVE_JPEG
/* import from @uobikiemukot's sdump loader.h */
Expand Down Expand Up @@ -369,28 +369,44 @@ load_png(unsigned char *buffer, int size,
*pixelformat = PIXELFORMAT_RGB888;
}
break;
case PNG_COLOR_TYPE_GRAY_ALPHA:
png_set_strip_alpha(png_ptr);
/* fall through */
case PNG_COLOR_TYPE_GRAY:
switch (bitdepth) {
case 1:
case 2:
case 4:
if (ppalette == NULL || (1 << bitdepth) > reqcolors) {
# if HAVE_DECL_PNG_SET_EXPAND_GRAY_1_2_4_TO_8
png_set_expand_gray_1_2_4_to_8(png_ptr);
*pcomp = 1;
*pixelformat = PIXELFORMAT_G8;
png_set_expand_gray_1_2_4_to_8(png_ptr);
# elif HAVE_DECL_PNG_SET_GRAY_1_2_4_TO_8
png_set_gray_1_2_4_to_8(png_ptr);
*pcomp = 1;
*pixelformat = PIXELFORMAT_G8;
png_set_gray_1_2_4_to_8(png_ptr);
# else
png_set_gray_to_rgb(png_ptr);
*pcomp = 3;
*pixelformat = PIXELFORMAT_RGB888;
png_set_expand(png_ptr);
# endif
png_set_gray_to_rgb(png_ptr);
*pcomp = 3;
*pixelformat = PIXELFORMAT_RGB888;
} else {
# if HAVE_DECL_PNG_SET_EXPAND_GRAY_1_2_4_TO_8
png_set_expand_gray_1_2_4_to_8(png_ptr);
*pcomp = 1;
*pixelformat = PIXELFORMAT_G8;
# elif HAVE_DECL_PNG_SET_GRAY_1_2_4_TO_8
png_set_gray_1_2_4_to_8(png_ptr);
*pcomp = 1;
*pixelformat = PIXELFORMAT_G8;
# else
png_set_expand(png_ptr);
png_set_gray_to_rgb(png_ptr);
*pcomp = 3;
*pixelformat = PIXELFORMAT_RGB888;
# endif
}
break;

case 8:
if (ppalette && *pncolors <= 1 << 8) {
if (ppalette && reqcolors >= (1 << 8)) {
*pcomp = 1;
*pixelformat = PIXELFORMAT_G8;
} else {
Expand All @@ -406,11 +422,6 @@ load_png(unsigned char *buffer, int size,
break;
}
break;
case PNG_COLOR_TYPE_GRAY_ALPHA:
png_set_gray_to_rgb(png_ptr);
*pcomp = 3;
*pixelformat = PIXELFORMAT_RGB888;
break;
case PNG_COLOR_TYPE_RGB_ALPHA:
png_set_strip_alpha(png_ptr);
*pcomp = 3;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "libsixel",
"version": "1.4.5",
"version": "1.4.9",
"repo": "saitoha/libsixel",
"description": "A lightweight, fast implementation of DEC SIXEL graphics codec",
"keywords": ["terminal", "graphics", "image", "sixel"],
Expand Down

0 comments on commit 7f73585

Please sign in to comment.