- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我需要构建 libpng,但在 pnglibconf.h 中没有#define PNG_READ_eXIf_SUPPORTED
我已经阅读了来自 pnglibconf.dfa
的评论,这里有一些禁用功能的方法,但是我没有设法使用它们来实现我想要的。问题在于,构建过程是在构建服务器上执行的,所以我无法更改 libpng 子模块内的任何文件。以下是服务器的工作原理:
cmake ..
生成 makefile make
命令。因此我有 libnpg,但包含 PNG_READ_eXIf_SUPPORTED
选项。Libpng 是我项目的一个子模块,所以它由构建服务器自动 check out ,所以我不能手动更改 pnglibconf。正如它在 pnglibconf.dfa
文件中所说:
There are three ways of disabling features, in no particular order:
1) Create 'pngusr.h', enter the required private build information detailed below and #define PNG_NO_<option> for each option you don't want in that file in that file. You can also turn on options using PNG_<option>_SUPPORTED. When you have finished rerun configure and rebuild pnglibconf.h file with -DPNG_USER_CONFIG:
make clean
CPPFLAGS='-DPNG_USER_CONFIG' ./configure
make pnglibconf.hpngusr.h is only used during the creation of pnglibconf.h, but it is safer to ensure that -DPNG_USER_CONFIG is specified throughout the build by changing the CPPFLAGS passed to the initial ./configure
我试着按照这里写的去做。我运行 cmake .. -DCMAKE_C_FLAGS="-DPNG_USER_CONFIG -I/home/me/dev/include"
其中 /home/me/dev/include
- 是一条路径pngusr.h
文件
然后我运行 make
命令。但是,PNG_READ_eXIf_SUPPORTED 仍然存在于生成的文件中(通过 make
命令 pnglibconf.h
文件)。所以我的主要问题是如何在没有 PNG_READ_eXIf_SUPPORTED
选项的情况下制作 libpng?
最佳答案
我仍然不清楚您尝试使用的特定自定义机制是否以及在多大程度上适用于您尝试使用的 libpng 版本。但看起来有更简单的方法。在您发布的摘录下方,在同一文件中,是第二个(三个)备选方案:
2) Add definitions of the settings you want to change to
CPPFLAGS
; for example:-DPNG_DEFAULT_READ_MACROS=0
(轻度格式化)。我不适合在基于 CMake 的构建系统上测试它,但它在 Autotools 构建系统中似乎很有魅力。通过检查和比较两者,我认为它也适用于 CMake。特别是,你会想要运行
cmake .. -DCMAKE_CPP_FLAGS="-DPNG_NO_READ_eXIf"
针对您的特定情况。
请注意,顺便说一句,CPP(即预处理器)标志是您指定的选项的正确位置(对于您最初尝试的 -DPNG_USR_CONFIG
也是如此)。但在实践中,它们可能仍然可以在 C 编译器标志中工作。
关于linux - 为 linux 构建不带 PNG_READ_eXIf_SUPPORTED 的 libpng,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56445068/
我有一个带 LCD 显示屏的微 Controller 。我需要显示几个 PNG 图像。由于微 Controller 的性能有限,显示图像的时间过长。 我做了基准测试并检测到大部分时间花在 libpng
我有一个应用程序依赖于过多的库(不是我们都依赖)。大多数这些库都是通过包管理器安装的。对于那些不是的,我重新编译了它们,但我仍然得到相同的 libpng 不兼容错误。 libpng warning:
我通过安装 matplotlib pip install matplotlib 当我尝试用它保存 png 时,我得到了 Application was compiled with png.h from
我收到一封来自 Google Play 商店的电子邮件,内容涉及“Google Play 警告:您正在使用易受攻击的 libpng 版本”。 电子邮件包含以下信息 - https://support.
我正在尝试将 libpng-1.16.6 构建为 VS 2010 的静态库。我想我已经排除了 makefile 语法问题、文件系统权限和不正确的 LIB/LIBPATH 环境变量。 makefile
我从 https://github.com/sourabhv/FlapPyBird 安装了 FlapPyBird 存储库.我已经安装了 libpng,但是当我尝试使用 python flappy.py
我从 https://github.com/sourabhv/FlapPyBird 安装了 FlapPyBird 存储库.我已经安装了 libpng,但是当我尝试使用 python flappy.py
我从 libpng 文档中获取了以下代码:此外,如果它有任何用处,此代码位于从基于 gtkmm 的应用程序调用的类中。 FILE *fp = fopen(path.c_str(), "rb"); if
我的应用程序用于使用 wifi 进行实时视频流和录制(音频和视频)。使用以下依赖项: repositories { maven { url 'https://raw.github.com/iParse
好的,所以在 photoshop 中,我创建了一个具有透明背景和一些文本的 8 位彩色图像。然后我创建了一个具有透明背景和一些文本的 16 位颜色的图像。 当我右键单击两个图像并转到属性时,它显示两个
我似乎无法让 libpng 将其数据转储到我的结构中。我不知道我做错了什么。我正在尝试翻转字节,因为 PNG 是自上而下存储的,我需要自下而上的数据。 首先我的结构看起来像: typedef unio
我正在尝试在 Mac OS X Yosemite 上使用 libpng 编译一个项目。 我得到了错误: Undefined symbols for architecture x86_64: "_p
我正在尝试掌握 libpng 中的基本功能。为此,我使用了 this snippet并适应我自己的例子。 int x, y; png_byte color_type = PNG_COLOR_TYPE_
我在尝试编译时遇到以下错误.... Undefined symbols for architecture x86_64: "_png_sig_cmp", referenced from: Render
我已按照苔丝二号的搭建说明进行操作 Github 我成功地使用 NDK 构建了 tess-two 并导入了库我正在尝试运行在同一存储库中提供的测试应用程序,但每当应用程序启动时,它都会出现以下异常:一
我已经通读了文档和示例,但在我的实现过程中,我无法做到正确。 问题:使用以下代码,写入的.png 将透明区域转换为纯白色。我试图将生成的 .png 覆盖在另一个带有颜色的图像之上,但由于不透明,底层图
下载源代码并将配置更改为 Release Library x64 并点击构建。它构建得很好,并且通过了一些测试。 然后我在我的项目中引用了 libpng(和 zlib 以避免一些任意错误),它构建得很
OS: centos-release-6-10.el6.centos.12.3.x86_64 Node version: v8.11.1 NPM version: 5.6.0 包.json { "
我正在使用 libpng 读取图像。图像本身有 4 个 channel (rgba), channel 有 8 位。我想将其作为灰度图像读取,最好是黑白图像(每像素 1 位),但即使是每像素 8 位也
我是 iPhone 开发新手,尝试使用 libpng 加载 PNG,但在尝试了这么多之后无法将其添加到我的项目中。将 libpng 添加到我的项目时出现以下错误。请帮助我如何消除这些错误: “_def
我是一名优秀的程序员,十分优秀!