Modify GetOnePixel usage to build against current ImageMagick api

This commit is contained in:
Caolan McNamara 2009-03-02 12:21:34 +00:00
parent d1cc259ba2
commit b58ddf2e23
2 changed files with 22 additions and 2 deletions

View File

@ -0,0 +1,15 @@
diff -ru autotrace-0.31.1.orig/input-magick.c autotrace-0.31.1/input-magick.c
--- autotrace-0.31.1.orig/input-magick.c 2009-03-02 12:08:45.000000000 +0000
+++ autotrace-0.31.1/input-magick.c 2009-03-02 12:12:21.000000000 +0000
@@ -83,7 +83,11 @@
for(j=0,runcount=0,point=0;j<image->rows;j++)
for(i=0;i<image->columns;i++) {
+#if (MagickLibVersion < 0x0645)
p=GetOnePixel(image,i,j);
+#else
+ GetOnePixel(image,i,j,pixel);
+#endif
AT_BITMAP_BITS(bitmap)[point++]=pixel->red; /* if gray: red=green=blue */
if(np==3) {
AT_BITMAP_BITS(bitmap)[point++]=pixel->green;

View File

@ -1,6 +1,6 @@
Name: autotrace
Version: 0.31.1
Release: 19%{?dist}
Release: 20%{?dist}
Summary: Utility for converting bitmaps to vector graphics
@ -20,6 +20,8 @@ BuildRequires: freetype-devel
#BuildRequires: pstoedit-devel
BuildConflicts: pstoedit-devel
Patch0: autotrace-0.31.1-GetOnePixel.patch
%description
AutoTrace is a program similar to CorelTrace or Adobe Streamline for
converting bitmaps to vector graphics.
@ -43,7 +45,7 @@ This package contains header files and static libraries for autotrace.
%prep
%setup -q
%patch0 -p1 -b .GetOnePixel
%build
%configure
@ -86,6 +88,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Mon Mar 02 2009 Caolán McNamara <caolanm@redhat.com> - 0.31.1-20
- Modify GetOnePixel usage to build against current ImageMagick api
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.31.1-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild