Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

images/snake-monochrome.png が正しく表示されない #23

Closed
msmhrt opened this issue Feb 1, 2015 · 7 comments
Closed

images/snake-monochrome.png が正しく表示されない #23

msmhrt opened this issue Feb 1, 2015 · 7 comments
Assignees
Labels

Comments

@msmhrt
Copy link
Collaborator

msmhrt commented Feb 1, 2015

OS: Ubuntu 14.04.1 (amd64)
Terminal: mlterm 最新版( https://bitbucket.org/arakiken/mlterm/commits/b2997e9c235db39ab79d3cf4c167c23796c0a5bb?at=default )

master ブランチの現在の HEAD ( d01f0d9 ) でビルドした img2sixelimages/snake-monochrome.png を表示すると、下記の画像のように表示されてしまう。

error_1

images/ 内の他の画像については問題ないようです。

@msmhrt
Copy link
Collaborator Author

msmhrt commented Feb 1, 2015

img2sixel の出力を sixel2png でPNGファイルにしたのが下記の画像です。
error_2
よって、mlterm 側の問題ではないと思われます。

@saitoha
Copy link
Owner

saitoha commented Feb 1, 2015

Debianのlibpng12-dev(libpng 1.2.50-2+b2)を使うことで再現しました。
converters/loder.c:377 のdefaultラベルに落ちた際のpng_set_gray_to_rgb()の挙動が私のMacに入っていたlibpng1.6と異なっていたのが、今まで見落としていた原因です。
代わりにpng_set_expand_gray_1_2_4_to_8() あるいは png_set_gray_1_2_4_to_8() を使用するよう、hotfix-for-issue23 というブランチに修正を入れました。
https://github.com/saitoha/libsixel/compare/hotfix-for-issue23

@msmhrt
Copy link
Collaborator Author

msmhrt commented Feb 1, 2015

hotfix-for-issue23 ブランチでビルドしましたが症状が変わらず問題が解決しませんでした。

ビルドログは下記になります。

https://gist.github.com/msmhrt/4d44853d2e9fa8695d72

@msmhrt
Copy link
Collaborator Author

msmhrt commented Feb 1, 2015

下記は、インストールされている libpng の詳細です。

$ dpkg -l |grep libpng
ii  libpng12-0:amd64                     1.2.50-1ubuntu2                            amd64        PNG library - runtime
ii  libpng12-dev                         1.2.50-1ubuntu2                            amd64        PNG library - development
$ apt-cache show libpng12-0:amd64
Package: libpng12-0
Priority: required
Section: libs
Installed-Size: 305
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Anibal Monsalve Salazar <anibal@debian.org>
Architecture: amd64
Source: libpng
Version: 1.2.50-1ubuntu2
Replaces: libpng12-dev (<= 1.2.8rel-7)
Depends: libc6 (>= 2.14), zlib1g (>= 1:1.1.4)
Pre-Depends: multiarch-support
Conflicts: libpng12-dev (<= 1.2.8rel-7), mzscheme (<= 1:209-5), pngcrush (<= 1.5.10-2), pngmeta (<= 1.11-3), povray-3.5 (<= 3.5.0c-10), qemacs (<= 0.3.1-5)
Filename: pool/main/libp/libpng/libpng12-0_1.2.50-1ubuntu2_amd64.deb
Size: 117426
MD5sum: f39ae3d8eece1609a11ccabc417980e1
SHA1: ca89c6cd6b9b0afbab8e390b279f90b4e5499eff
SHA256: ab4256aa7b304f1e4852c7f545024ee77ebd2f9fa58f1f277162ad991bd10003
Description-ja: PNG ライブラリ - ランタイム
 libpng は PNG (ポータブルネットワークグラフィックス) 形式のファイルの読み書
 きを行なうためのインターフェースを実装したライブラリです。
 .
 本パッケージには、libpng を利用するソフトウェアを実行するのに必要なランタイ ムライブラリファイルが含まれます。
Description-md5: f250be9224d67eae99b2f562b74a33bf
Multi-Arch: same
Homepage: http://libpng.org/pub/png/libpng.html
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 5y
Task: minimal

$

@saitoha
Copy link
Owner

saitoha commented Feb 2, 2015

@msmhrt すみません。config.hに微妙なtypoがありました。6a48f6a で修正してみました。

@msmhrt
Copy link
Collaborator Author

msmhrt commented Feb 2, 2015

6a48f6a をビルドして、問題なきことを確認しました。

バッチリです。ありがとうございました。

@saitoha
Copy link
Owner

saitoha commented Feb 2, 2015

ご確認ありがとうございます。

@saitoha saitoha closed this as completed Feb 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants