from_blob can't find file in /tmp

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
shad0an

from_blob can't find file in /tmp

Post 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...
shad0an

Re: from_blob can't find file in /tmp

Post 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... :?
shad0an

Re: from_blob can't find file in /tmp

Post by shad0an »

Any ideas? I am really stuck on this one...

Thanks!
rmagick
Posts: 245
Joined: 2006-03-16T17:30:48-07:00
Location: Durham, NC, USA

Re: from_blob can't find file in /tmp

Post 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.
shad0an

Re: from_blob can't find file in /tmp

Post 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?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: from_blob can't find file in /tmp

Post 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.
shad0an

Re: from_blob can't find file in /tmp

Post by shad0an »

Ah, well, that might be it! I will give it a go. Thanks!
Post Reply