且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

1.5.10 libpng的错误:提领指向不完全类型

更新时间:2023-11-10 10:24:16

png_info 结构从删除 png.h 1.5.0,现在你应该使用这个指针与 png_get _ * png_set _ * 功能。

The png_info struct was removed from the png.h in 1.5.0 and now you should use this pointer with the png_get_* and png_set_* functions.

的libpng手动

的png_info结构被设计成提供有关的信息
  PNG文件。有一段时间,png_info领​​域的用意是
  直接访问给用户。然而,这往往会导致
  使用动态加载的库问题的应用程序,并作为
  结果为png_info一组接口函数(该png_get _ *()
  和png_set _ *()函数)的开发,并直接进入
  png_info领​​域是德precated ..

The png_info structure is designed to provide information about the PNG file. At one time, the fields of png_info were intended to be directly accessible to the user. However, this tended to cause problems with applications using dynamically loaded libraries, and as a result a set of interface functions for png_info (the png_get_*() and png_set_*() functions) was developed, and direct access to the png_info fields was deprecated..

例如:

png_uint_32 height;
height = png_get_image_height( png_ptr,  info_ptr);