PNG support not compiled. Please install the libpng development package before building.

1,300 views
Skip to first unread message

leezx1993

unread,
Jan 23, 2018, 6:47:16 AM1/23/18
to webp-d...@webmproject.org
I am an Android Dev. I want to get the img2webp.exe
Using Android Studio ndk-build or Cmake build the libwebp.
I have used Macport download jpeg libpng tiff giflib according to https://developers.google.com/speed/webp/docs/compiling.
My Android.mk and CMakeList.txt download from https://github.com/webmproject/libwebp

The following ports are currently installed:

  bzip2 @1.0.6_0 (active)

  db48 @4.8.30_4 (active)

  expat @2.2.5_0 (active)

  gettext @0.19.8.1_0 (active)

  giflib @4.2.3_0+x11 (active)

  jpeg @9c_0 (active)

  libedit @20170329-3.1_2 (active)

  libffi @3.2.1_0 (active)

  libiconv @1.15_0 (active)

  libpng @1.6.34_0 (active)

  libxml2 @2.9.7_0 (active)

  ncurses @6.0-20171125_0 (active)

  openssl @1.0.2n_0 (active)

  python2_select @0.0_2 (active)

  python27 @2.7.14_0 (active)

  python_select @0.3_7 (active)

  sqlite3 @3.21.0_0 (active)

  tiff @4.0.9_0 (active)

  webp @0.6.1_0 (active)

  xorg-kbproto @1.0.7_0 (active)

  xorg-libice @1.0.9_0 (active)

  xorg-libpthread-stubs @0.4_0 (active)

  xorg-libsm @1.2.2_0 (active)

  xorg-libX11 @1.6.5_0 (active)

  xorg-libXau @1.0.8_0 (active)

  xorg-libxcb @1.12_2+python27 (active)

  xorg-libXdmcp @1.1.2_0 (active)

  xorg-xcb-proto @1.12_1+python27 (active)

  xorg-xproto @7.0.31_0 (active)

  xz @5.2.3_0 (active)

  zlib @1.2.11_0 (active)

I get the img2webp.exe,

But the errors still happen  when i use it--PNG support not compiled. Please install the libpng development package before building.

or JPEG support not compiled. Please install the jpeg development package before building.

How can i do please?


James Zern

unread,
Jan 23, 2018, 11:08:26 PM1/23/18
to WebP Discussion, leez...@163.com
Hi,


On Tuesday, January 23, 2018 at 3:47:16 AM UTC-8, leezx1993 wrote:
I am an Android Dev. I want to get the img2webp.exe
Using Android Studio ndk-build or Cmake build the libwebp.
I have used Macport download jpeg libpng tiff giflib according to https://developers.google.com/speed/webp/docs/compiling.
My Android.mk and CMakeList.txt download from https://github.com/webmproject/libwebp

The following ports are currently installed:


What version of cmake are you using? I don't see it in your port list. It's possible the version you have isn't searching /opt/local (the default install path for macports). From the cmake run you should see something like the following in the console output:
-- Found PNG: /opt/local/lib/libpng.dylib (found version "1.6.34") 
...
If not have a look at CMakeFiles/CMakeOutput.log and CMakeFiles/CMakeError.log to see more detail about the libpng detection error. The cmake version from macports should find these files correctly.

James Zern

unread,
Jan 24, 2018, 2:04:43 AM1/24/18
to WebP Discussion
+webp-discuss

On Tue, Jan 23, 2018 at 10:49 PM, leezx1993 <leez...@163.com> wrote:
I use ndk-build to build the img2webp.exe
This is my project,

You'll need to add WEBP_HAVE_PNG, etc. to the defines for pngdec.c and the rest [1]. You'll also need to reference the libs in LOCAL_STATIC_LIBRARIES for the img2webp target.
 
I have added png/zlib code into app/jni except official code and add theirs Android.mk,but the errors still occur when i use img2webp.exe execute a command line like
"-loop 0 /storage/emulated/0/Pictures/Camera/overlay4video.png -d 80 -o /storage/emulated/0/Pictures/Camera/a.webp"


Reply all
Reply to author
Forward
0 new messages