rpms/dvdauthor/devel dvdauthor-0.6.18-gmagick138-599000.patch, NONE, 1.1 dvdauthor.spec, 1.17, 1.18
Ville Skyttä
scop at fedoraproject.org
Mon Jun 7 19:20:02 UTC 2010
Author: scop
Update of /cvs/pkgs/rpms/dvdauthor/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv28462/devel
Modified Files:
dvdauthor.spec
Added Files:
dvdauthor-0.6.18-gmagick138-599000.patch
Log Message:
* Mon Jun 7 2010 Ville Skyttä <ville.skytta at iki.fi> - 0.6.18-2
- Patch to fix subtitle creation with GraphicsMagick > 1.3.7 (#599000).
dvdauthor-0.6.18-gmagick138-599000.patch:
subgen-image.c | 29 ++++++++++++++---------------
1 file changed, 14 insertions(+), 15 deletions(-)
--- NEW FILE dvdauthor-0.6.18-gmagick138-599000.patch ---
diff -up dvdauthor/src/subgen-image.c~ dvdauthor/src/subgen-image.c
--- dvdauthor/src/subgen-image.c~ 2010-03-13 10:14:07.000000000 +0200
+++ dvdauthor/src/subgen-image.c 2010-06-07 21:28:40.495577415 +0300
@@ -155,6 +155,13 @@ static void createimage(pict *s,int w,in
}
#if defined(HAVE_MAGICK) || defined(HAVE_GMAGICK)
+// meaning of A in RGBA swapped in ImageMagick 6.0.0 and GraphicsMagick 1.3.8
+#if defined(HAVE_MAGICK)
+#define XMAGICK_NEW_RGBA_MINVER 0x600
+#else // HAVE_GMAGICK
+#define XMAGICK_NEW_RGBA_MINVER 0x060300
+#define ExportImagePixels DispatchImage
+#endif
static int read_magick(pict *s)
/* uses ImageMagick/GraphicsMagick to read image s from s->fname. */
{
@@ -162,6 +169,8 @@ static int read_magick(pict *s)
ImageInfo *ii;
ExceptionInfo ei;
int x,y;
+ unsigned long magickver;
+ unsigned char amask;
GetExceptionInfo(&ei);
ii=CloneImageInfo(NULL);
@@ -179,17 +188,13 @@ static int read_magick(pict *s)
return -1;
}
createimage(s,im->columns,im->rows);
+ GetMagickVersion(&magickver);
+ amask = magickver < XMAGICK_NEW_RGBA_MINVER ? 255 : 0;
for( y=0; y<im->rows; y++ ) {
char pdata[MAXX*4];
- if(!
-#ifdef HAVE_MAGICK
- ExportImagePixels
-#else // HAVE_GMAGICK
- DispatchImage
-#endif
- (im,0,y,im->columns,1,"RGBA",CharPixel,pdata,&ei)) {
- fprintf(stderr,"ERR: Extracting row %d from %s (%s,%s)\n",y,s->fname,ei.reason,ei.description);
+ if(!ExportImagePixels(im,0,y,im->columns,1,"RGBA",CharPixel,pdata,&ei)) {
+ fprintf(stderr,"ERR: Extracting row %d from %s (%s,%s)\n",y,s->fname,ei.reason,ei.description);
CatchException(&ei);
MagickError(ei.severity,ei.reason,ei.description);
DestroyImage(im);
@@ -201,13 +206,7 @@ static int read_magick(pict *s)
p.r=pdata[x*4];
p.g=pdata[x*4+1];
p.b=pdata[x*4+2];
- // the meaning of RGBA swapped with ImageMagick 6.0.0...
- // ...but not with GraphicsMagick
-#if defined(HAVE_MAGICK) && MagickLibVersion >= 0x600
- p.t=pdata[x*4+3];
-#else
- p.t=255-pdata[x*4+3];
-#endif
+ p.t = pdata[x*4+3] ^ amask;
putpixel(s,y*s->width+x,&p);
}
}
Index: dvdauthor.spec
===================================================================
RCS file: /cvs/pkgs/rpms/dvdauthor/devel/dvdauthor.spec,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -p -r1.17 -r1.18
--- dvdauthor.spec 18 Mar 2010 18:05:18 -0000 1.17
+++ dvdauthor.spec 7 Jun 2010 19:20:02 -0000 1.18
@@ -1,12 +1,14 @@
Name: dvdauthor
Version: 0.6.18
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Command line DVD authoring tool
Group: Applications/Multimedia
License: GPLv2+
URL: http://dvdauthor.sourceforge.net/
Source0: http://downloads.sourceforge.net/dvdauthor/%{name}-%{version}.tar.gz
+# http://github.com/ldo/dvdauthor/commit/b481525
+Patch0: dvdauthor-0.6.18-gmagick138-599000.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libdvdread-devel >= 0.9.4-4
@@ -26,6 +28,7 @@ MPEG-2 stream that should play when you
%prep
%setup -q -n %{name}
chmod -c -x src/subgen-image.c
+%patch0 -p1
%build
@@ -63,6 +66,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Mon Jun 7 2010 Ville Skyttä <ville.skytta at iki.fi> - 0.6.18-2
+- Patch to fix subtitle creation with GraphicsMagick > 1.3.7 (#599000).
+
* Thu Mar 18 2010 Ville Skyttä <ville.skytta at iki.fi> - 0.6.18-1
- Update to 0.6.18 ("official" again), all patches applied upstream.
More information about the scm-commits
mailing list