Update for libpng 1.5 API
This commit is contained in:
parent
d44830eaf3
commit
5822c50aba
35
FreeImage-3.10.0-libpng15.patch
Normal file
35
FreeImage-3.10.0-libpng15.patch
Normal file
@ -0,0 +1,35 @@
|
||||
--- Source/FreeImage/PluginPNG.cpp.orig 2012-02-13 20:40:18.980814932 -0600
|
||||
+++ Source/FreeImage/PluginPNG.cpp 2012-02-13 21:20:54.917409944 -0600
|
||||
@@ -322,7 +322,8 @@
|
||||
|
||||
png_read_info(png_ptr, info_ptr);
|
||||
png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, NULL, NULL, NULL);
|
||||
- pixel_depth = info_ptr->pixel_depth;
|
||||
+ pixel_depth = png_get_bit_depth(png_ptr, info_ptr) *
|
||||
+ png_get_channels(png_ptr, info_ptr);
|
||||
|
||||
// get image data type (assume standard image type)
|
||||
|
||||
@@ -534,11 +535,11 @@
|
||||
|
||||
if (png_get_valid(png_ptr, info_ptr, PNG_INFO_iCCP)) {
|
||||
png_charp profile_name = NULL;
|
||||
- png_charp profile_data = NULL;
|
||||
+ png_bytepp profile_data = NULL;
|
||||
png_uint_32 profile_length = 0;
|
||||
int compression_type;
|
||||
|
||||
- png_get_iCCP(png_ptr, info_ptr, &profile_name, &compression_type, &profile_data, &profile_length);
|
||||
+ png_get_iCCP(png_ptr, info_ptr, &profile_name, &compression_type, profile_data, &profile_length);
|
||||
|
||||
// copy ICC profile data (must be done after FreeImage_Allocate)
|
||||
|
||||
@@ -771,7 +772,7 @@
|
||||
|
||||
FIICCPROFILE *iccProfile = FreeImage_GetICCProfile(dib);
|
||||
if (iccProfile->size && iccProfile->data) {
|
||||
- png_set_iCCP(png_ptr, info_ptr, "Embedded Profile", 0, (png_charp)iccProfile->data, iccProfile->size);
|
||||
+ png_set_iCCP(png_ptr, info_ptr, "Embedded Profile", 0, (png_const_bytep)iccProfile->data, iccProfile->size);
|
||||
}
|
||||
|
||||
// write metadata
|
@ -3,7 +3,7 @@
|
||||
|
||||
Name: freeimage
|
||||
Version: 3.10.0
|
||||
Release: 8%{?dist}
|
||||
Release: 9%{?dist}
|
||||
Summary: Multi-format image decoder library
|
||||
Group: System Environment/Libraries
|
||||
# freeimage is dual-licensed, see Whatsnew.txt (search for license) or:
|
||||
@ -13,6 +13,7 @@ URL: http://freeimage.sourceforge.net/
|
||||
Source0: http://downloads.sourceforge.net/%{name}/FreeImage%{_version}.zip
|
||||
Patch0: FreeImage-3.10.0-syslibs.patch
|
||||
Patch1: FreeImage-3.10.0-doxygen.patch
|
||||
Patch2: FreeImage-3.10.0-libpng15.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: libjpeg-devel libpng-devel libtiff-devel OpenEXR-devel
|
||||
BuildRequires: libmng-devel openjpeg-devel doxygen
|
||||
@ -114,6 +115,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Feb 13 2012 Bruno Wolff III <bruno@wolff.to> 3.10.0-9
|
||||
- Update for libpng 1.5 API
|
||||
|
||||
* Thu Feb 09 2012 Rex Dieter <rdieter@fedoraproject.org> 3.10.0-8
|
||||
- rebuild (openjpeg)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user