Page 1 of 1

from_blob can't find file in /tmp

Posted: 2009-03-24T11:29:20-07:00
by shad0an
Hey all, I am running into an issue in using a Ruby library called Scruffy, which in part uses RMagick, which uses ImageMagick. I am running into an error that looks something like this:
/usr/local/lib/ruby/gems/1.8/gems/scruffy-0.2.5/lib/scruffy/rasterizers/rmagick_rasterizer.rb:15:in `from_blob': unable to open file `/tmp/magick-XXaki1QC': No such file or directory (Magick::ImageMagickError)
from /usr/local/lib/ruby/gems/1.8/gems/scruffy-0.2.5/lib/scruffy/rasterizers/rmagick_rasterizer.rb:15:in `rasterize
/tmp is configured correctly, and I even tried changing MAGICK_TMPDIR, which results in the same error, but instead of /tmp, the directory I choose.

Here is my configuration
# convert -list configure
Path: /usr/local/lib/ImageMagick-6.4.2/config/configure.xml

Name Value
-------------------------------------------------------------------------------
CC gcc
CFLAGS -fopenmp -g -O2 -Wall -W -pthread
CONFIGURE ./configure
COPYRIGHT Copyright (C) 1999-2008 ImageMagick Studio LLC
CPPFLAGS -I/usr/local/include/ImageMagick
CXX g++
CXXFLAGS -g -O2 -Wall -W -pthread
DEFS -DHAVE_CONFIG_H
DELEGATES freetype jpeg png zlib
DISTCHECK_CONFIG_FLAGS --disable-deprecated --with-quantum-depth=16 --with-djvu=no --with-umem=no --with-fontpath= --with-fontconfig=no --with-lqr=no --with-rsvg=no --with-xml=no
EXEC-PREFIX /usr/local
HOST i686-pc-linux-gnu
LDFLAGS -L/usr/local/lib -lfreetype
LIB_VERSION 0x642
LIB_VERSION_NUMBER 6,4,2,4
LIBS -lMagickCore -lfreetype -ljpeg -lz -lm -lgomp -lpthread
NAME ImageMagick
PCFLAGS -fopenmp
PREFIX /usr/local
QuantumDepth 16
RELEASE_DATE 07/24/08
VERSION 6.4.2
WEBSITE http://www.imagemagick.org
--
Any ideas? My google-fu seems to be failing me...

Re: from_blob can't find file in /tmp

Posted: 2009-03-24T12:57:01-07:00
by shad0an
Okay, tried the extremely simple:

convert -verbose input.svg output.jpeg

And got
Start of Image
Define Huffman Table 0x00
0 1 5 1 1 1 1 1
1 0 0 0 0 0 0 0
Define Huffman Table 0x01
0 3 1 1 1 1 1 1
1 1 1 0 0 0 0 0
Define Huffman Table 0x10
0 2 1 3 3 2 4 3
5 5 4 4 0 0 1 125
Define Huffman Table 0x11
0 2 1 2 4 4 3 4
7 5 4 4 0 1 2 119
End Of Image
convert: missing an image filename `output.jpeg'.
Seems sort of odd I can't even use convert... :?

Re: from_blob can't find file in /tmp

Posted: 2009-03-26T05:21:34-07:00
by shad0an
Any ideas? I am really stuck on this one...

Thanks!

Re: from_blob can't find file in /tmp

Posted: 2009-03-26T15:53:42-07:00
by rmagick
I suggest that you upgrade to the latest version of ImageMagick and then see if both problems are resolved. If upgrading doesn't fix the tmp file problem, report it to the Scruffy developers. If upgrading doesn't fix the convert problem, then post a link to the input .svg file here so that somebody else can try to reproduce it.

Re: from_blob can't find file in /tmp

Posted: 2009-03-26T17:47:07-07:00
by shad0an
Yeah, I did upgrade and am still running into a similar issue.
convert -list configure

Path: /usr/local/lib/ImageMagick-6.5.0/config/configure.xml

Name Value
-------------------------------------------------------------------------------
CC gcc -std=gnu99
CFLAGS -fopenmp -g -O2 -Wall -W -pthread
CONFIGURE ./configure
COPYRIGHT Copyright (C) 1999-2009 ImageMagick Studio LLC
CPPFLAGS -I/usr/local/include/ImageMagick
CXX g++
CXXFLAGS -g -O2 -Wall -W -pthread
DEFS -DHAVE_CONFIG_H
DELEGATES freetype jpeg 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
EXEC-PREFIX /usr/local
HOST i686-pc-linux-gnu
LDFLAGS -L/usr/local/lib -lfreetype
LIB_VERSION 0x650
LIB_VERSION_NUMBER 6,5,0,6
LIBS -lMagickCore -ltiff -lfreetype -ljpeg -lz -lm -lgomp -lpthread
NAME ImageMagick
PCFLAGS -fopenmp
PREFIX /usr/local
QuantumDepth 16
RELEASE_DATE 2009-03-24
VERSION 6.5.0
WEBSITE http://www.imagemagick.org
When I try to convert an svg to jpeg or png, here is what I get
convert circle1.svg out.png

ERROR: meta.c (179): wmf_header_read: this isn't a wmf file
convert: Delegate failed `"wmf2eps" -o "%o" "%i"' @ delegate.c/InvokeDelegate/1015.
convert: unable to open image `/tmp/magick-XXJqgQlR': No such file or directory @ blob.c/OpenBlob/2432.
convert: unable to open file `/tmp/magick-XXJqgQlR': No such file or directory @ constitute.c/ReadImage/565.
convert: missing an image filename `out.png' @ convert.c/ConvertImageCommand/2775.
The circle1.svg I am using is curled from http://www.w3schools.com/svg/circle1.svg.

Any thoughts?

Re: from_blob can't find file in /tmp

Posted: 2009-03-26T17:53:26-07:00
by magick
Install rsvg, rsvg-devel, libxml2 and libxml2-devel RPMS first then rerun the ImageMagick configure script and verify that RSVG is validated (check the last 30-40 lines of output from the configure script). Once RSVG is validated and ImageMagick reinstalled you should be able to view / convert SVG.

Re: from_blob can't find file in /tmp

Posted: 2009-03-26T18:45:07-07:00
by shad0an
Ah, well, that might be it! I will give it a go. Thanks!