Extracing SVG data... from JPG
Posted: 2012-10-19T05:33:44-07:00
Hi IM folks,
My first post, not sure if I'm dealing with a bug or a feature - but to me it's a problem in any case.
I have been using ImageMagick for a number of years to extract SVG data from JPG files - the images concerned are JPEGs that have embedded paths created in Photoshop. Normally one would use TIFF or EPS to be able to utilise these paths, but my web app is able to extract the paths from the JPEG format, thereby allowing much smaller file sizes than EPS or TIFF. Unfortunately this feature stopped working on a recent install.
The command I use to retrieve the SVG data is
I then use regex to parse the output to create a TIFF mask from the SVG data.
This is working perfectly on CentOS 5.5, ImageMagick 6.6.7-2
It is NOT working on CentOS 5.8, ImageMagick 6.6.5-10
On the latter version, it IS possible to retrieve the SVG data if the file is a TIFF, but not when it's a JPEG.
A sample image is available here: http://198.101.244.68/testsvg.jpg
The configuration details for the two installs are below.
Any help greatly appreciated!
Pier
##### IM 6.6.5, CentOS 5.8 ######
Path: /usr/lib64/ImageMagick-6.6.5/config/configure.xml
Name Value
-------------------------------------------------------------------------------
CC gcc -std=gnu99 -std=gnu99
CFLAGS -fopenmp -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -pthread
CONFIGURE ./configure '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--enable-shared' '--disable-static' '--with-modules' '--with-perl' '--with-x' '--with-threads' '--with-magick_plus_plus' '--with-gslib' '--with-wmf' '--with-lcms' '--with-rsvg' '--with-xml' '--with-perl-options=INSTALLDIRS=vendor CC='\''gcc -L/usr/src/redhat/BUILD/ImageMagick-6.6.5-10/magick/.libs'\'' LDDLFLAGS='\''-shared -L/usr/src/redhat/BUILD/ImageMagick-6.6.5-10/magick/.libs'\''' '--without-dps' '--without-included-ltdl' '--with-ltdl-include=/usr/include' '--with-ltdl-lib=/usr/lib64' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'target_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' 'CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'
COPYRIGHT Copyright (C) 1999-2010 ImageMagick Studio LLC
CPPFLAGS -I/usr/include/ImageMagick
CXX g++
CXXFLAGS -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -pthread
DEFS -DHAVE_CONFIG_H
DELEGATES bzlib djvu fontconfig freetype gs jpeg jng jp2 lcms png rsvg tiff x11 xml wmf zlib
DISTCHECK_CONFIG_FLAGS 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-dps=no --with-fontpath=
EXEC-PREFIX /usr
FEATURES OpenMP
HOST x86_64-redhat-linux-gnu
LDFLAGS -L/usr/lib64
LIB_VERSION 0x665
LIB_VERSION_NUMBER 6,6,5,10
LIBS -lMagickCore -llcms -ltiff -lfreetype -ljpeg -lfontconfig -lXext -lSM -lICE -lX11 -lXt -lbz2 -lz -lm -lgomp -lpthread -lltdl
NAME ImageMagick
PCFLAGS -fopenmp
PREFIX /usr
QuantumDepth 16
RELEASE_DATE 2011-06-02
VERSION 6.6.5
WEBSITE http://www.imagemagick.org
Path: [built-in]
Name Value
-------------------------------------------------------------------------------
NAME ImageMagick
##############################
##### IM 6.6.7, CentOS 5.5 ######
Path: /usr/local/lib/ImageMagick-6.6.7/config/configure.xml
Name Value
-------------------------------------------------------------------------------
CC gcc -std=gnu99 -std=gnu99
CFLAGS -fopenmp -g -O2 -Wall -pthread
CONFIGURE ./configure '--with-png' '--with-tiff' '--with-jpg'
COPYRIGHT Copyright (C) 1999-2011 ImageMagick Studio LLC
CPPFLAGS -I/usr/local/include/ImageMagick
CXX g++
CXXFLAGS -g -O2 -pthread
DEFS -DHAVE_CONFIG_H
DELEGATES jpeg jng mpeg png tiff zlib
DISTCHECK_CONFIG_FLAGS --disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-fontconfig=no --with-gslib=no --with-fontpath= --with-rsvg=no --with-xml=no --with-perl=no
EXEC-PREFIX /usr/local
FEATURES OpenMP
HOST i686-pc-linux-gnu
LDFLAGS -L/usr/local/lib
LIB_VERSION 0x667
LIB_VERSION_NUMBER 6,6,7,2
LIBS -lMagickCore -ltiff -ljpeg -lpng -lz -lm -lgomp -lpthread
NAME ImageMagick
PCFLAGS -fopenmp
PREFIX /usr/local
QuantumDepth 16
RELEASE_DATE 2011-01-24
VERSION 6.6.7
WEBSITE http://www.imagemagick.org
Path: [built-in]
Name Value
-------------------------------------------------------------------------------
NAME ImageMagick
##############################
My first post, not sure if I'm dealing with a bug or a feature - but to me it's a problem in any case.
I have been using ImageMagick for a number of years to extract SVG data from JPG files - the images concerned are JPEGs that have embedded paths created in Photoshop. Normally one would use TIFF or EPS to be able to utilise these paths, but my web app is able to extract the paths from the JPEG format, thereby allowing much smaller file sizes than EPS or TIFF. Unfortunately this feature stopped working on a recent install.
The command I use to retrieve the SVG data is
Code: Select all
identify -verbose /path/to/image.jpg
This is working perfectly on CentOS 5.5, ImageMagick 6.6.7-2
It is NOT working on CentOS 5.8, ImageMagick 6.6.5-10
On the latter version, it IS possible to retrieve the SVG data if the file is a TIFF, but not when it's a JPEG.
A sample image is available here: http://198.101.244.68/testsvg.jpg
The configuration details for the two installs are below.
Any help greatly appreciated!
Pier
##### IM 6.6.5, CentOS 5.8 ######
Path: /usr/lib64/ImageMagick-6.6.5/config/configure.xml
Name Value
-------------------------------------------------------------------------------
CC gcc -std=gnu99 -std=gnu99
CFLAGS -fopenmp -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -pthread
CONFIGURE ./configure '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--enable-shared' '--disable-static' '--with-modules' '--with-perl' '--with-x' '--with-threads' '--with-magick_plus_plus' '--with-gslib' '--with-wmf' '--with-lcms' '--with-rsvg' '--with-xml' '--with-perl-options=INSTALLDIRS=vendor CC='\''gcc -L/usr/src/redhat/BUILD/ImageMagick-6.6.5-10/magick/.libs'\'' LDDLFLAGS='\''-shared -L/usr/src/redhat/BUILD/ImageMagick-6.6.5-10/magick/.libs'\''' '--without-dps' '--without-included-ltdl' '--with-ltdl-include=/usr/include' '--with-ltdl-lib=/usr/lib64' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'target_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' 'CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'
COPYRIGHT Copyright (C) 1999-2010 ImageMagick Studio LLC
CPPFLAGS -I/usr/include/ImageMagick
CXX g++
CXXFLAGS -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -pthread
DEFS -DHAVE_CONFIG_H
DELEGATES bzlib djvu fontconfig freetype gs jpeg jng jp2 lcms png rsvg tiff x11 xml wmf zlib
DISTCHECK_CONFIG_FLAGS 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-dps=no --with-fontpath=
EXEC-PREFIX /usr
FEATURES OpenMP
HOST x86_64-redhat-linux-gnu
LDFLAGS -L/usr/lib64
LIB_VERSION 0x665
LIB_VERSION_NUMBER 6,6,5,10
LIBS -lMagickCore -llcms -ltiff -lfreetype -ljpeg -lfontconfig -lXext -lSM -lICE -lX11 -lXt -lbz2 -lz -lm -lgomp -lpthread -lltdl
NAME ImageMagick
PCFLAGS -fopenmp
PREFIX /usr
QuantumDepth 16
RELEASE_DATE 2011-06-02
VERSION 6.6.5
WEBSITE http://www.imagemagick.org
Path: [built-in]
Name Value
-------------------------------------------------------------------------------
NAME ImageMagick
##############################
##### IM 6.6.7, CentOS 5.5 ######
Path: /usr/local/lib/ImageMagick-6.6.7/config/configure.xml
Name Value
-------------------------------------------------------------------------------
CC gcc -std=gnu99 -std=gnu99
CFLAGS -fopenmp -g -O2 -Wall -pthread
CONFIGURE ./configure '--with-png' '--with-tiff' '--with-jpg'
COPYRIGHT Copyright (C) 1999-2011 ImageMagick Studio LLC
CPPFLAGS -I/usr/local/include/ImageMagick
CXX g++
CXXFLAGS -g -O2 -pthread
DEFS -DHAVE_CONFIG_H
DELEGATES jpeg jng mpeg png tiff zlib
DISTCHECK_CONFIG_FLAGS --disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-fontconfig=no --with-gslib=no --with-fontpath= --with-rsvg=no --with-xml=no --with-perl=no
EXEC-PREFIX /usr/local
FEATURES OpenMP
HOST i686-pc-linux-gnu
LDFLAGS -L/usr/local/lib
LIB_VERSION 0x667
LIB_VERSION_NUMBER 6,6,7,2
LIBS -lMagickCore -ltiff -ljpeg -lpng -lz -lm -lgomp -lpthread
NAME ImageMagick
PCFLAGS -fopenmp
PREFIX /usr/local
QuantumDepth 16
RELEASE_DATE 2011-01-24
VERSION 6.6.7
WEBSITE http://www.imagemagick.org
Path: [built-in]
Name Value
-------------------------------------------------------------------------------
NAME ImageMagick
##############################