标签: libpng

需要帮助在mac os x上安装python包autopy - libpng和png.h的难度

我想知道是否有人能帮助我解决这个问题.当我尝试python setup.py build(或pip install,或easy_install)时,会发生这种情况

要点是

src/png_io.c:3:17: error: png.h: No such file or directory
src/png_io.c: In function ‘newMMBitmapFromPNG’:
src/png_io.c:34: error: ‘png_struct’ undeclared (first use in this function)
src/png_io.c:34: error: (Each undeclared identifier is reported only once
Run Code Online (Sandbox Code Playgroud)

......一堆错误......

src/png_io.c:332: error: ‘PNG_TRANSFORM_IDENTITY’ undeclared (first use in this function)
lipo: can't figure out the architecture type of:  /var/folders/kt/d8t29zkx7kd_7c_mr17ntv6m0000gn/T//ccubs4CM.out

error: command 'gcc-4.2' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)

libpng位于Library/Frameworks中,它位于<> includes(我用cpp -v检查)的搜索路径上,但它在那里作为libpng.framework,然后标题位于名为headers的子目录中.libpng.framework文件中还有几个版本的libpng.我也在运行64位python.任何想法如何进行?

谢谢,帕特

c python macos gcc libpng

7
推荐指数
1
解决办法
1543
查看次数

MacOSX下与libpng的链接器错误

我正在研究MacOSX 10.7.2和Xcode 4.2.1.我libpng使用端口安装,我试图在我的应用程序中加载PNG图像,但我得到链接器错误:

Undefined symbols for architecture x86_64:
  "_png_create_read_struct", referenced from:
      loadPngImage(char*, int&, int&, bool&, unsigned char**) in test.o
  "_png_create_info_struct", referenced from:
      loadPngImage(char*, int&, int&, bool&, unsigned char**) in test.o
  "_png_destroy_read_struct", referenced from:
      loadPngImage(char*, int&, int&, bool&, unsigned char**) in test.o
  "_png_set_longjmp_fn", referenced from:
      loadPngImage(char*, int&, int&, bool&, unsigned char**) in test.o
  "_png_init_io", referenced from:
      loadPngImage(char*, int&, int&, bool&, unsigned char**) in test.o
  "_png_set_sig_bytes", referenced from:
      loadPngImage(char*, int&, int&, bool&, unsigned char**) in test.o
  "_png_read_png", referenced from:
      loadPngImage(char*, …
Run Code Online (Sandbox Code Playgroud)

macos xcode linker-errors libpng

7
推荐指数
1
解决办法
7362
查看次数

在Windows上使用pngcrush恢复XCode压缩?

我有一些从IPA文件中提取的png图像,我想要恢复原来的PNG,我被告知pngcush完成了所需的任务,所以我下载了它并尝试运行以下命令:

pngcrush -fix icon.png icon1.png
Run Code Online (Sandbox Code Playgroud)

但我得到一个libpng错误.我不知道是否还需要下载libpng,因为错误并没有说我需要一个不同版本的libpng,只是说:

While reading icon.png:
  pngcrush caught libpng error:
   incorrect header check
Run Code Online (Sandbox Code Playgroud)

我也试过这个:

pngcrush -revert-iphone-optimizations icon.png icn1.png
Run Code Online (Sandbox Code Playgroud)

并且pngcrush表现得好像不知道命令.

关于该怎么做的任何想法?

xcode png libpng pngcrush

7
推荐指数
1
解决办法
4014
查看次数

libpng警告:在Python/PyGame中使用png_read_image时应该打开隔行处理

我正在使用PyGame for Python,并在加载.png图像时收到以下警告pygame.image.load:

libpng warning: Interlace handling should be turned on when using png_read_image
Run Code Online (Sandbox Code Playgroud)

它不会影响程序,但变得特别烦人.我在网上搜索无济于事的答案.

我目前正在使用32位Python 3.3和PyGame 1.9.2

关于如何让警告消失的任何想法?

python pygame libpng python-3.x

7
推荐指数
1
解决办法
3万
查看次数

Iphone - 设备 - 链接器错误

我已将libpng添加到我的应用程序中.如果我为模拟器构建,一切都很好.当我为设备构建应用程序时,我收到链接器错误:

    Undefined symbols for architecture armv7: "_png_init_filter_functions_neon", referenced from: _png_read_filter_row in libpng-arm7-release.a(pngrutil.o)
Run Code Online (Sandbox Code Playgroud)

我已经从源手动构建了libpng,对于模拟器和设备也是如此(只有更改了编译目标).我试图找到这个问题,但似乎没有人发布有关此问题的任何内容.

objective-c linker-errors libpng

7
推荐指数
1
解决办法
4157
查看次数

GraphicsMagick CgBI未知的关键块

我正在使用GraphicsMagick并且目前遇到以下问题:

执行时

gm identify <filename>.png
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

gm identify: CgBI: unknown critical chunk (<filename>.png)
gm identify: Request did not return an image.
Run Code Online (Sandbox Code Playgroud)

这是从iPhone中提取的png.虽然它可能不包含实际图像,但我确实需要图像信息.

尝试与几位编辑打开它:

  1. png在Paint中以正确的高度x宽度打开,但是完全是白色.
  2. 巴布亚新几内亚并没有在GIMP打开,称它可能会被破坏
  3. png在Paint.net中打开,正确的高度x宽度作为透明图像

使用debug参数提供以下行:

libpng-1.5.14 error: CgBI: unknown critical chunk
Run Code Online (Sandbox Code Playgroud)

我正在运行最新的GraphicsMagick(1.3.18).

有谁知道发生了什么,以及我将如何得到这个以返回图像信息?

提前致谢.

png libpng graphicsmagick pngcrush

7
推荐指数
1
解决办法
3494
查看次数

UnsatisfiedLinkError In Android 4.4 libDevil cannot locate symbol "png_set_longjmp_fn"

I have an image converter app on google play that runs fine and well, it incorporates NDK for support of more file formats using the DevIL Image Processing library.

It wokrs fine on most devices but since Android 4.4 Kitkat came out, i've received emails and crash reports on Google Play Console especially from Nexus devices that have 4.4 and now other older devices that receive the update

Here is the crash report

java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "png_set_longjmp_fn" …
Run Code Online (Sandbox Code Playgroud)

android libpng android-ndk unsatisfiedlinkerror

7
推荐指数
1
解决办法
2825
查看次数

cmake - CMakeLists.txt不在根文件夹中(但包含在源文件夹中)

我正在尝试编译一个libpng库.问题是我需要这个库的特定版本 - 1.2.37 - 因为我使用它的项目是用这个版本编写的.我发现这个版本的源代码在这里(的GnuWin32项目).

但文件夹结构看起来像这样:

libpng-1.2.37-src/
   contrib/
   projects/
   scripts/
      CMakeLists.txt
   png.h
   pngread.c
   pngwrite.c
   ...
Run Code Online (Sandbox Code Playgroud)

请参阅,CMakeLists.txt比源文件深一级.

我试过了:

  1. 源目录libpng-1.2.37-src / - >导致错误:源目录似乎不包含CMakeLists.txt
  2. 源目录libpng-1.2.37-src/scripts - >导致多个错误:文件libpng-1.2.37-src/scripts/scripts/libpng.pc.in不存在.
  3. / scripts中的 CMakeLists.txt复制到/libpng-1.2.37-src并将源目录设置为/libpng-1.2.37-src - >导致错误:源"/libpng-1.2.37-src/CMakeLists.txt "与源"/libpng-1.2.37-src/scripts/CMakeLists.txt"不匹配,用于生成缓存.

我该怎么做才能让它发挥作用?我不知道为什么如果不能使用CMakeLists.txt文件将被包括在内.

c++ cmake libpng

7
推荐指数
1
解决办法
5万
查看次数

未找到libpng"png_set_longjmp_fn"

我正在使用ubuntu的libpng,当我尝试编译一个c ++文件时,我得到了

未定义的对"png_set_longjmp_fn"的引用

我使用的是libpng 1.6.8版

如果您有兴趣阅读代码,请告诉我,但我不会这与我的错误代码有关.

先感谢您.

c++ compiler-errors libpng

7
推荐指数
1
解决办法
8990
查看次数

如何在Amazon EC2上安装支持PNG的GraphicsMagick?

如果您天真地按照GraphicsMagick网站上的步骤操作,在运行后./configure,您最终没有PNG支持:

checking for PNG support ...
checking png.h usability... no
checking png.h presence... no

PNG               --with-png=yes        no
Run Code Online (Sandbox Code Playgroud)

这使得一个非常无用的GraphicsMagick安装.

如何启用PNG支持?Libpng似乎已经安装,但未检测到:

> $ sudo yum install libpng
> Package 2:libpng-1.2.49-1.12.amzn1.x86_64 already installed and latest version
Run Code Online (Sandbox Code Playgroud)

amazon-ec2 libpng graphicsmagick

6
推荐指数
1
解决办法
8114
查看次数