Re: 1.2 bug? (plus a SRPM bug or two)

Bob Friesenhahn <[email protected]> Fri, 2 May 2008 11:33:44 -0500 (CDT)
Newsgroups gmane.comp.video.graphicsmagick.bugs
Message-ID <[email protected]>
On Thu, 1 May 2008, Don MacAskill wrote:
>
> Just compiled 1.2 from the tarball (after the 1.2-1 SRPM wouldn't build
> - more on that in a second), and a basic JPEG resize seems to wipe out
> the EXIF data:
>
> gm mogrify -resize 1600x1200 filename.jpg
>
> The IPTC, APP1, and ICC profiles are all still intact, properly, but
> EXIF is gone.  I've tried multiple JPEGs from multiple cameras.

This is because GraphicsMagick still does not save EXIF profiles. 
Simply saving the EXIF profile "as is" is not the right thing to do. 
Certain things should be edited/removed prior to saving the profile.

I have heard a number of complaints about this, so obviously it is 
something that needs to be fixed.

> Also, the SRPM fails to build properly because it's looking for 'NEWS',
> which doesn't exist.  Changing the spec file to look for 'NEWS.txt' does
> properly build an RPM.

Thanks.  That is an easy fix.

> Finally, installing said RPM gives a 'No decode delegate for this image
> format (filename.jpg).' error even on a JPEG, despite seeing in the
> configure log that all the JPEG stuff was found.  A vanilla 'configure;

That is definitely cause for concern.  The spec file requests a 
"modules" build.  GraphicsMagick 1.2 is using libtool 2.2.X with a new 
libltdl.  If a suitable (at least assumed so) libltdl is already 
installed, it will be used.  Perhaps the installed libltdl is not 
actually suitable?  If adding the configure option 
--with-included-ltdl solves the problem, then that indicates an issue 
with the already installed libltdl

Are you able and willing to help resolve this issue?  I have attached 
an updated GraphicsMagick.spec.in which was just committed to CVS.  It 
fixes the naming of the NEWS file as well as requests running libtool 
in its normal "verbose" mode so that more data can be available to 
resolve the problem.  A build log is appreciated.  The most effective 
way to diagnose the problem is to perform the same build "by hand" in 
order to investigate what is going on.

Module loading may be diagnosed via

MAGICK_DEBUG=configure gm convert -list formats

You can use

MAGICK_DEBUG=configure,coder

in front of any GM command in order to see how it configures itself, 
loads modules, and what the encode/decode support is doing.  There is 
also a -debug option you can use but this misses logging a bit of 
initialization code.

> Whew.  The good news is that 1.2 seems to be quite fast at the few
> operations I've tried - awesome!  :)

Yes.  Performance, security, and stability have been the focus of 
GraphicsMagick 1.2.  Performance has improved quite substantially over 
the 1.1.X series, and it looks even better since ImageMagick has 
become substantially slower and more cumbersome during that time. 
ImageMagick takes 2X to 4X longer than GraphicsMagick to work with 
small files since its intialization time is so huge.

Make sure that you have the quantum depth (8 or 16) set the same when 
comparing GraphicsMagick and ImageMagick so that it is a fair 
comparison.

Bob
======================================
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

_______________________________________________
Graphicsmagick-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-bugs
GraphicsMagick.spec.in (text/plain, 9.5 KB)
# Allow for selectively disabling from commandline
%{!?quant:%define quant 8}
%{!?perlm:%define perlm 1}
%{!?cplus:%define cplus 1}

%define base_version @PACKAGE_VERSION@

# This is a one line description of the package.
Summary: An X application for displaying and manipulating images.
# This must be the name string from the rpm filename you plan to use.
Name: @PACKAGE_NAME@
# This must be the version string from the rpm filename you plan to use.
Version: @PACKAGE_VERSION@@PACKAGE_VERSION_ADDENDUM@
# This is the release number for a package of the same version (ie. if
# we make a package and find it to be slightly broken and need to make
# it again, the next package would be release number 2).
Release: 1
License: MIT
# This is a group that the package belongs to in a higher level
# package tool or the Red Hat installer.
Group: X11/Applications/Graphics
# This line points at the HOME location of the pristine source
# file. It is used if you ever want to get the source again or check
# for newer versions.
Source: ftp://ftp.GraphicsMagick.org/pub/%{name}/%{name}-%{version}.tar.bz2
Url: http://www.GraphicsMagick.org/
# This line allows you to specify a directory as the "root" for
# building and installing the new package. You can use this to help
# test your package before having it installed on your machine.
Buildroot: %{_tmppath}/%{name}-%{version}-root
BuildPrereq: bzip2-devel, freetype-devel, libjpeg-devel, libpng-devel
BuildPrereq: libtiff-devel, zlib-devel
BuildPrereq: freetype-devel >= 2.0.1
Requires: bzip2, freetype, libjpeg, libpng, zlib

%description
GraphicsMagick(TM) provides a powerful image manipulation and
translation utility. It is capable of displaying still images and
animations using the X Window system, provides a simple interface for
interactively editing images, and is capable of importing selected
windows or the entire desktop. GraphicsMagick can read and write over
88 image formats, including JPEG, TIFF, WMF, SVG, PNG, PNM, GIF, and
Photo CD. It can resize, rotate, sharpen, color reduce, or add special
effects to the image and save the result to any supported format.
GraphicsMagick may be used to create animated or transparent .gifs,
create composite images, create thumbnail images, and much, much,
more.

GraphicsMagick is one of your choices if you need a program to manipulate
and display images. If you want to develop your own applications
which use GraphicsMagick code or APIs, you need to install
GraphicsMagick-devel as well.

%package devel
Summary: Static libraries and header files for GraphicsMagick app development.
Group: X11/Development/Libraries
Requires: %{name} = %{version}-%{release}

%description devel
GraphicsMagick-devel contains the static libraries and header files you'll
need to develop GraphicsMagick applications. GraphicsMagick is an image
manipulation program.

If you want to create applications that will use GraphicsMagick code or
APIs, you need to install GraphicsMagick-devel as well as GraphicsMagick.
You do not need to install it if you just want to use GraphicsMagick,
however.

%if %{perlm}
%package perl
Summary: GraphicsMagick perl bindings
Group: System Environment/Libraries
BuildPrereq: perl >= 5.6.0
Requires: %{name} = %{version}-%{release}, perl >= 5.6.0

%description perl
Perl bindings to GraphicsMagick.

Install GraphicsMagick-perl if you want to use any perl scripts that use
GraphicsMagick.
%endif

%if %{cplus}
%package c++
Summary: GraphicsMagick Magick++ library (C++ bindings)
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}

%description c++
This package contains the Magick++ library, a C++ binding to the GraphicsMagick
graphics manipulation library.

Install GraphicsMagick-c++ if you want to use any applications that use
Magick++.

%package c++-devel
Summary: C++ bindings for the GraphicsMagick library
Group: Development/Libraries
Requires: %{name} = %{version}, %{name}-c++ = %{version}
Requires: %{name}-devel = %{version}, bzip2-devel, freetype-devel
Requires: libjpeg-devel, libpng-devel, libtiff-devel, zlib-devel, libxml2-devel

%description c++-devel
GraphicsMagick-devel contains the static libraries and header files you'll
need to develop GraphicsMagick applications using the Magick++ C++ bindings.
GraphicsMagick is an image manipulation program.

If you want to create applications that will use Magick++ code or APIs,
you'll need to install GraphicsMagick-c++-devel, GraphicsMagick-devel and
GraphicsMagick.  You don't need to install it if you just want to use
GraphicsMagick, or if you want to develop/compile applications using the
GraphicsMagick C interface, however.
%endif

%prep
%setup -q

%build
# If you have trouble during the installation phase, then
# uncomment the two lines below.  You may be using an older
# libtool that sometimes has trouble linking the files.

#GM=$RPM_BUILD_DIR/%{name}-%{version}
#export LDFLAGS="-L$GM/magick/.libs $LDFLAGS"

%if %{perlm}
# Maybe this will fix perl installation issues.
if [ -z "`perl -v | grep 5.8`" ]; then
    export PERLOPTS="PREFIX=$RPM_BUILD_ROOT%{_prefix}"
fi
%endif

# This shouldn't be there yet.
rm -f PerlMagick/Makefile.PL

%configure --enable-libtool-verbose --enable-shared --disable-static \
	--with-modules --enable-lzw \
	--with-frozenpaths \
%if %{perlm}
	--with-perl \
	--with-perl-options="$PERLOPTS" \
%else
	--without-perl \
%endif
%if %{cplus}
	--with-magick-plus-plus \
%else
	--without-magick-plus-plus \
%endif
	--with-quantum-depth=%{quant}
make

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install

%if %{perlm}
# Remove unpackaged files.
rm -f `find $RPM_BUILD_ROOT%{_libdir}/perl*/ -name perllocal.pod -type f`
rm -f `find $RPM_BUILD_ROOT%{_libdir}/perl*/ -name .packlist -type f`
%endif

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(644, root, root, 755)
%doc ChangeLog Copyright.txt README.txt NEWS.txt
%doc %{_datadir}/%{name}-%{base_version}
%{_libdir}/lib%{name}.so.*
%{_libdir}/lib%{name}Wand.so.*
%dir %{_libdir}/%{name}-%{base_version}
%{_libdir}/%{name}-%{base_version}/config/*.mgk
%dir %{_libdir}/%{name}-%{base_version}/modules-Q%{quant}
%{_libdir}/%{name}-%{base_version}/modules-Q%{quant}/*/*.so
%attr(755, root, root) %{_bindir}/gm
%attr(644, root, man) %{_mandir}/man1/gm.1.gz
%attr(644, root, man) %{_mandir}/man4/*gz
%attr(644, root, man) %{_mandir}/man5/*gz

%files devel
%defattr(644, root, root, 755)
%dir %{_includedir}/%{name}/wand
%{_includedir}/%{name}/wand/*
%dir %{_includedir}/%{name}/magick
%{_includedir}/%{name}/magick/*
%{_libdir}/lib%{name}Wand.*a
%{_libdir}/lib%{name}Wand.so
%{_libdir}/lib%{name}.*a
%{_libdir}/lib%{name}.so
%dir %{_libdir}/%{name}-%{base_version}/modules-Q%{quant}
%{_libdir}/%{name}-%{base_version}/modules-Q%{quant}/*/*.la
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/pkgconfig/%{name}Wand.pc
%{_bindir}/%{name}-config
%attr(755, root, root) %{_bindir}/%{name}-config
%{_bindir}/%{name}Wand-config
%attr(755, root, root) %{_bindir}/%{name}Wand-config
%attr(644, root, man) %{_mandir}/man1/%{name}-config.1.gz
%attr(644, root, man) %{_mandir}/man1/%{name}Wand-config.1.gz

%if %{perlm}
%files perl
%defattr(644, root, root, 755)
%dir %{_libdir}/perl*/site_perl/*/*/Graphics
%{_libdir}/perl*/site_perl/*/*/Graphics/Magick.pm
%dir %{_libdir}/perl*/site_perl/*/*/auto/Graphics/Magick
%{_libdir}/perl*/site_perl/*/*/auto/Graphics/Magick/*
%attr(644, root, man) %{_mandir}/man3/*gz
%endif

%if %{cplus}
%files c++
%defattr(644, root, root, 755)
%{_libdir}/lib%{name}++.so.*

%files c++-devel
%defattr(644, root, root, 755)
%{_includedir}/%{name}/Magick++.h
%dir %{_includedir}/%{name}/Magick++
%{_includedir}/%{name}/Magick++/*
%{_libdir}/lib%{name}++.*a
%{_libdir}/lib%{name}++.so
%{_libdir}/pkgconfig/%{name}++.pc
%{_bindir}/%{name}++-config
%attr(755, root, root) %{_bindir}/%{name}++-config
%attr(644, root, man) %{_mandir}/man1/%{name}++-config.1.gz
%endif

%changelog
* Wed Jun 02 2004 Bob Friesenhahn <[email protected]> 1.2
- Install *-config scripts with mode 755 rather than default 644.

* Sat Feb 21 2004 Bob Friesenhahn <[email protected]> 1.1-1
- Added some comments.
- Eliminated DATE variable.
- Support creating RPMs of snapshots packages.
- Don't remove /usr/include/magick or %{_datadir}/%{name} since they
  are not created anymore.
- Fixed location of .mgk files.

* Mon Jul 28 2003 Bob Friesenhahn <[email protected]> 1.1-1
- Changed default quantum depth to 8 bits.

* Mon Jun 28 2003 Troy Edwards <[email protected]> 1.1-20030628
- Updated to CVS build, added the GraphicsMagickWand files to the spec.
- Only try to remove the unneeded perl package files if we are using
  PerlMagick.

* Mon Jun 09 2003 Troy Edwards <[email protected]> 1.0.2-3
- removed libungif as a dependancy
- changed with/without-magick_plus_plus -> with/without-magick-plus-plus
- Use --with-perl-options instead of patching Makefile.in
- Only set a perl prefix if we aren't using perl >= 5.8.0

* Sat Jun 07 2003 Troy Edwards <[email protected]> 1.0.2-2
- patch to pass DESTDIR to install-exec-perl since some users
  reported problems

* Sat Jun 07 2003 Troy Edwards <[email protected]> 1.0.2-1
- updated to 1.0.2

* Tue May 05 2003 Troy Edwards <[email protected]> 1.0-1
- updated to 1.0 Final

* Fri Apr 25 2003 Troy Edwards <[email protected]> 1.0-Beta1-1
- updated to 1.0-Beta1

* Mon Oct 22 2002 Troy Edwards <[email protected]>
- updated to 1.0.0pre