No imagick images after successful install

Trouble during PacsOne Server installations
Post Reply
rsj
Posts:3
Joined:Wed Apr 20, 2011 5:41 pm
No imagick images after successful install

Post by rsj » Wed Apr 20, 2011 5:47 pm

I've installed PacsOne server premium edition on Ubuntu 10.4 LTS.

Everything works except I do not see any images. The most obvious symptom of this is that home.php shows "*** Anti-Spam Code: 1234 ***" rather than a graphic. When I load test dicom data into PacsOne, I do not see any images either.

The output of Hello.php (phpinfo), shows that the pacsone version of imagick is loaded successfully. I've tried to ensure that the apache user (www-data) has all required permissions on the relevant locations. What else could be causing this problem?

Excerpt from Hello.php output:

imagick
ImageMagick support enabled
Magick Backend ImageMagick
ImageMagick version 5.5.6
PHP imagick version 0.9.11
MaxRGB 65535
Supported image formats IMPLICIT
Font Family - Name AvantGarde - AvantGarde-Book
Font Family - Name AvantGarde - AvantGarde-BookOblique
Font Family - Name AvantGarde - AvantGarde-Demi
Font Family - Name AvantGarde - AvantGarde-DemiOblique
Font Family - Name Bookman - Bookman-Demi
Font Family - Name Bookman - Bookman-DemiItalic
Font Family - Name Bookman - Bookman-Light
Font Family - Name Bookman - Bookman-LightItalic
Font Family - Name Courier - Courier
Font Family - Name Courier - Courier-Bold
Font Family - Name Courier - Courier-Oblique
Font Family - Name Courier - Courier-BoldOblique
Font Family - Name Helvetica - Helvetica
Font Family - Name Helvetica - Helvetica-Bold
Font Family - Name Helvetica - Helvetica-Oblique
Font Family - Name Helvetica - Helvetica-BoldOblique
Font Family - Name Helvetica Narrow - Helvetica-Narrow
Font Family - Name Helvetica Narrow - Helvetica-Narrow-Oblique
Font Family - Name Helvetica Narrow - Helvetica-Narrow-Bold
Font Family - Name Helvetica Narrow - Helvetica-Narrow-BoldOblique
Font Family - Name NewCenturySchlbk - NewCenturySchlbk-Roman
Font Family - Name NewCenturySchlbk - NewCenturySchlbk-Italic
Font Family - Name NewCenturySchlbk - NewCenturySchlbk-Bold
Font Family - Name NewCenturySchlbk - NewCenturySchlbk-BoldItalic
Font Family - Name Palatino - Palatino-Roman
Font Family - Name Palatino - Palatino-Italic
Font Family - Name Palatino - Palatino-Bold
Font Family - Name Palatino - Palatino-BoldItalic
Font Family - Name Times - Times-Roman
Font Family - Name Times - Times-Bold
Font Family - Name Times - Times-Italic
Font Family - Name Times - Times-BoldItalic
Font Family - Name Symbol - Symbol

rsj
Posts:3
Joined:Wed Apr 20, 2011 5:41 pm

More info

Post by rsj » Wed Apr 20, 2011 6:29 pm

After putting some debugging statements in login.php, I find that the following statements are responsible for the error:

if (!$error && !imagick_drawannotation( $handle, 50, 20, $text ) ) {
print "DEBUG: error encountered in 5th if: $text\n<br>";
$error = true;
}

The previous imagick_* functions in the code do not generate an error, but imagick_drawannotation does. I would love to hear from a pacsone representative regarding troubleshooting.

My PHP version is 5.3 and I'm using the imagick.so from the Imagick-5.5.6-Q16/php5.3 directory in the pacsone distribution.

I had to enable super globals and enable the dl() function in php.ini to get this far.

pacsone
Site Admin
Posts:3149
Joined:Tue Sep 30, 2003 2:47 am

Post by pacsone » Wed Apr 20, 2011 8:18 pm

Do you have the GhostScript fonts package installed on this server? They are used to draw/burn-in the anti-spam code text into a blank JPG background image.

More specifically, the /usr/local/lib/ImageMagick-5.5.6-Q16/type-ghostscript.mgk configuration is looking in the following directory by default for the GhostScript fonts:

Code: Select all

/usr/share/ghostscript/fonts/

rsj
Posts:3
Joined:Wed Apr 20, 2011 5:41 pm

Post by rsj » Wed Apr 20, 2011 8:27 pm

pacsone wrote:Do you have the GhostScript fonts package installed on this server? They are used to draw/burn-in the anti-spam code text into a blank JPG background image.

More specifically, the /usr/local/lib/ImageMagick-5.5.6-Q16/type-ghostscript.mgk configuration is looking in the following directory by default for the GhostScript fonts:

Code: Select all

/usr/share/ghostscript/fonts/
Hi. "gsfonts" are installed. The ubuntu location is /usr/share/fonts/type1/gsfonts/<font>.[afm|pfb].

Fonts in that location are readable by www-data (the user owning the apache process) and the "metrics" and "glyphs" entries in /usr/local/lib/ImageMagick-5.5.6-Q16/type-ghostscrpit.mgk have been adjusted to point to the font files referenced above. Still no graphics.

Other ideas?

www-data@pacs:/$ ls /usr/share/fonts/type1/gsfonts
a010013l.afm a010035l.afm b018032l.afm c059016l.afm d050000l.afm n019023l.afm n019044l.afm n021003l.afm n021024l.afm n022023l.afm p052004l.afm s050000l.afm
a010013l.pfb a010035l.pfb b018032l.pfb c059016l.pfb d050000l.pfb n019023l.pfb n019044l.pfb n021003l.pfb n021024l.pfb n022023l.pfb p052004l.pfb s050000l.pfb
a010013l.pfm a010035l.pfm b018032l.pfm c059016l.pfm d050000l.pfm n019023l.pfm n019044l.pfm n021003l.pfm n021024l.pfm n022023l.pfm p052004l.pfm s050000l.pfm
a010015l.afm b018012l.afm b018035l.afm c059033l.afm n019003l.afm n019024l.afm n019063l.afm n021004l.afm n022003l.afm n022024l.afm p052023l.afm z003034l.afm
a010015l.pfb b018012l.pfb b018035l.pfb c059033l.pfb n019003l.pfb n019024l.pfb n019063l.pfb n021004l.pfb n022003l.pfb n022024l.pfb p052023l.pfb z003034l.pfb
a010015l.pfm b018012l.pfm b018035l.pfm c059033l.pfm n019003l.pfm n019024l.pfm n019063l.pfm n021004l.pfm n022003l.pfm n022024l.pfm p052023l.pfm z003034l.pfm
a010033l.afm b018015l.afm c059013l.afm c059036l.afm n019004l.afm n019043l.afm n019064l.afm n021023l.afm n022004l.afm p052003l.afm p052024l.afm
a010033l.pfb b018015l.pfb c059013l.pfb c059036l.pfb n019004l.pfb n019043l.pfb n019064l.pfb n021023l.pfb n022004l.pfb p052003l.pfb p052024l.pfb
a010033l.pfm b018015l.pfm c059013l.pfm c059036l.pfm n019004l.pfm n019043l.pfm n019064l.pfm n021023l.pfm n022004l.pfm p052003l.pfm p052024l.pfm

www-data@pacs:/$ head -13 /usr/local/lib/ImageMagick-5.5.6-Q16/type-ghostscript.mgk
<?xml version="1.0"?>
<typemap>
<type
name="AvantGarde-Book"
fullname="AvantGarde Book"
family="AvantGarde"
foundry="URW"
weight="400"
style="normal"
stretch="normal"
format="type1"
metrics="/usr/share/fonts/type1/gsfonts/a010013l.afm"
glyphs="/usr/share/fonts/type1/gsfonts/a010013l.pfb"
<snipped for brevity. entire file available if needed.>

pacsone
Site Admin
Posts:3149
Joined:Tue Sep 30, 2003 2:47 am

Post by pacsone » Wed Apr 20, 2011 11:25 pm

Can you check specifically the block for the "Courier" font name in your /usr/local/lib/ImageMagick-5.5.6-Q16/type-ghostscript.mgk configuration file? For example:

Code: Select all

<type
    name="Courier"
    fullname="Courier Regular"
    family="Courier"
    foundry="URW"
    weight="400"
    style="normal"
    stretch="normal"
    format="type1"
    metrics="/usr/share/ghostscript/fonts/n022003l.afm"
    glyphs="/usr/share/ghostscript/fonts/n022003l.pfb"
    />

pacsone
Site Admin
Posts:3149
Joined:Tue Sep 30, 2003 2:47 am

Post by pacsone » Wed Apr 20, 2011 11:30 pm

You can also try adding the following debug print when the function imagick_drawannoation() failed:

Code: Select all

if (!$error && !imagick_drawannotation( $handle, 50, 20, $text ) ) {
$reason = imagick_failedreason( $handle ) ;
$description = imagick_faileddescription( $handle ) ;
print "DEBUG: reason = $reason, description = $description<br>";
$error = true;
}

nwhiteley
Posts:5
Joined:Wed May 11, 2011 6:41 pm

Post by nwhiteley » Thu May 12, 2011 3:09 pm

Was there any resolution to this? I have the same problem.

pacsone
Site Admin
Posts:3149
Joined:Tue Sep 30, 2003 2:47 am

Post by pacsone » Thu May 12, 2011 3:30 pm

1. Did you check to see if the ImageMagick PHP extension is loaded successfully from the output of the test page below?

http://localhost/pacsone/Hello.php

The previous posts were more about the Ghostscript fonts which are used to "burn" the anti-spam code displayed at the Login page, whereas you should be able to the converted thumbnail JPG images from your browser displayed for the received Dicom studies as long as the ImageMagick PHP extension is loaded successfully.

2. If so, did you check and make sure the Ghostscripts fonts package is installed and the paths are consistent with the default paths in the /usr/local/lib/ImageMagick-5.5.6-Q16/type-ghostscript.mgk configuration file (see all previous posts about this topic)?

Post Reply