schani / metapixel

A Photomosaic Generator
http://www.complang.tuwien.ac.at/schani/metapixel/
GNU General Public License v2.0
114 stars 16 forks source link

libpng error: Invalid palette #10

Open ottok opened 6 years ago

ottok commented 6 years ago

I am running Ubuntu 17.04 with latest Metapixel version with latest libraries available in this distro.

Then running the prepare command I get the following error message:

$ metapixel-prepare -r screenshots metapixel-library
libpng error: Invalid palette
metapixel: rwpng.c:199: open_png_file_writing: Assertion `0' failed.
Aborted (core dumped)
Error running metapixel - skipping file screenshots/aaa.com.png
libpng error: Invalid palette
metapixel: rwpng.c:199: open_png_file_writing: Assertion `0' failed.
Aborted (core dumped)
Error running metapixel - skipping file screenshots/bbb.fi.png
libpng error: Invalid palette
metapixel: rwpng.c:199: open_png_file_writing: Assertion `0' failed.
Aborted (core dumped)
Error running metapixel - skipping file screenshots/ccc.fi.png
libpng error: Invalid palette
metapixel: rwpng.c:199: open_png_file_writing: Assertion `0' failed.
Aborted (core dumped)
Error running metapixel - skipping file screenshots/ddd.com.png
libpng error: Invalid palette
metapixel: rwpng.c:199: open_png_file_writing: Assertion `0' failed.
Aborted (core dumped)

This happens on every file. The PNG images are created with wkhtmltoimage. I've tried to fiddle with the palette using optipng and GraphicsMagic, but the error message does not change.

This has also been reported at:

This is a wonderful piece of software and I hope somebody would have time to update it a bit.

pieqq commented 6 years ago

Hello!

Same errors here with Ubuntu 17.10...

pieqq commented 6 years ago

I managed to get it to work by compiling from source, so for those interested, here is what I've done:

Get the required source code from GitHub:

git clone https://github.com/schani/metapixel.git
cd metapixel/rwimg
git clone https://github.com/schani/rwimg.git .
cd ../lispreader
git clone https://github.com/schani/lispreader.git .
cd ..

Install the development libraries and tools:

sudo apt install libpng-dev libjpeg-dev libgif-dev xsltproc docbook-xsl-ns

Edit the Makefile file and replace

MANPAGE_XSL = /usr/share/xml/docbook/stylesheet/nwalsh/current/manpages/docbook.xsl

with

MANPAGE_XSL = /usr/share/xml/docbook/stylesheet/docbook-xsl-ns/manpages/doclbook.xsl

And finally, compile and enjoy!

make
sudo make install
twopiradians commented 6 years ago

Hello,Many thanks,here it works good with : sudo apt install git at first... and the development libraries and tools here it's ok with any sudo apt install libperl-dev libgtk-3-dev and here the valid substitution in the Makefile is MANPAGE_XSL = /usr/share/xml/docbook/stylesheet/docbook-xsl-ns/manpages/docbook.xsl Thank you so much

lmedici commented 6 years ago

Hello, I startet with the same error like ottok above wrote. recompiled the program like peqq said. i received some warnings, but not really dangerous thing like (not used... and so on) i installed the libperl-dev and the libgtk2.0-dev libs too. But when i want to run metapixel i receive for every file "Error runnig metapixel - skipping file ..."

I'm using ubuntu 17.10

Any idea what i'm doing wrong?

Thanks for every hint.

twopiradians commented 5 years ago

first install git for 18.04 LTS to 19.04 then folow what «pieqq» said up + install those development libraries and tools

libpng-dev libjpeg-dev libgif-dev xsltproc docbook-xsl-ns libperl-dev libgtk-3-dev

and valid substitution in the Makefile is MANPAGE_XSL = /usr/share/xml/docbook/stylesheet/docbook-xsl-ns/manpages/docbook.xsl

it's work !

ronaldoff commented 5 years ago

Hi Tried, but not working Get "open_png_file_writing: Assertion `0' failed. Aborted (core dumped) Error running metapixel - skipping file /"...

What's the problem ? Thx if someone can help