[opensuse-kde3] libpng15 patch for digikam & gwenview
Ilya, All, Does anyone have a working libpng15 patch for digikam and gwenview? If so where? -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse-kde3+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kde3+owner@opensuse.org
On 03/28/2012 07:18 AM, David C. Rankin wrote:
Ilya, All,
Does anyone have a working libpng15 patch for digikam and gwenview? If so where?
Let me ask it this way. I get an error building digikam on libpng15 in trinity like this: pngloader.cpp: In member function 'virtual bool Digikam::PNGLoader::load(const TQString&, Digikam::DImgLoaderObserver*)': pngloader.cpp:123:9: error: invalid use of incomplete type 'png_struct {aka struct png_struct_def}' /usr/include/png.h:855:16: error: forward declaration of 'png_struct {aka struct png_struct_def}' pngloader.cpp:410:99: warning: invalid conversion from 'char**' to 'png_bytepp {aka unsigned char**}' [-fpermissive] pngloader.cpp: In member function 'virtual bool Digikam::PNGLoader::save(const TQString&, Digikam::DImgLoaderObserver*)': pngloader.cpp:529:9: error: invalid use of incomplete type 'png_struct {aka struct png_struct_def}' /usr/include/png.h:855:16: error: forward declaration of 'png_struct {aka struct png_struct_def}' pngloader.cpp:602:132: warning: invalid conversion from 'char*' to 'png_const_bytep {aka const unsigned char*}' [-fpermissive] pngloader.cpp:662:39: warning: deprecated conversion from string constant to 'png_charp {aka char*}' [-Wwrite-strings] pngloader.cpp: In member function 'long int Digikam::PNGLoader::formatStringList(char*, size_t, const char*, __va_list_tag*)': pngloader.cpp:970:55: warning: function might be possible candidate for 'gnu_printf' format attribute [-Wmissing-format-attribute] pngloader.cpp: In member function 'virtual bool Digikam::PNGLoader::load(const TQString&, Digikam::DImgLoaderObserver*)': pngloader.cpp:90:41: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result [-Wunused-result] It seems that this is a libpng15 change that is impacting digikam as well as gwenview. I have found a clue that: 'libpng-1.5 removed direct access to png_struct and png_info' which seems to fit with the error. I have downloaded the libpng code and I'm trying to make sense of what I need to patch in digikam to work with libpng15. This is where I need help. Any of our kde3 devs encountered something like this before? Where should I start looking in the code and what am I looking to patch? I get the problem starts with pngloader.cpp:123:9 in digikam, but what should I look for in libpng that will tell me how the png_struct changed? Any help appreciated. Thanks. -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse-kde3+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kde3+owner@opensuse.org
On 03/28/2012 10:49 AM, David C. Rankin wrote:
Any of our kde3 devs encountered something like this before? Where should I start looking in the code and what am I looking to patch? I get the problem starts with pngloader.cpp:123:9 in digikam, but what should I look for in libpng that will tell me how the png_struct changed? Any help appreciated. Thanks.
The information describing the change is in libpng src/libpng-manual.txt II. Structures There are two main structures that are important to libpng, png_struct and png_info. Both are internal structures that are no longer exposed in the libpng interface (as of libpng 1.5.0). 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.. ^^^^^^^^^^^^ The png_struct structure is the object used by the library to decode a single image. As of 1.5.0 this structure is also not exposed. I'll post an update when a patch is finished. If you find/develop a patch first, let me know. Thanks. -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse-kde3+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kde3+owner@opensuse.org
participants (1)
-
David C. Rankin