jschollen has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,

Seems that the PDL package is realy hard to get up and running on a windows machine. Thanks to some, I was able to compile it. But nog I can't use it :(

I have written the next line of code:
$test = zeroes(byte,3,500,300,4); $image = rim($test->slice(':,:,:,(0)'),'GardenSM.jpeg'); $image2 = float($image); ($depth, $xsize, $ysize) = dims($image2);
Windows returns to me:
Use of uninitialized value in concatenation (.) or string at C:/Perl/s +ite/lib/PDL/IO/Pic.pm line 320. Use of uninitialized value in pattern match (m//) at C:/Perl/site/lib/ +PDL/IO/Pic.pm line 321. Oops, this is not a PNM fileconverter error: at C:/Perl/site/lib/PDL/ +IO/Pnm.pm line 77
The same error is given when I use rpic instead of rim.

Does someone know what's going on?

Guess it has to do with the file type.
JPEG is not a default supported data type with PDL.

Replies are listed 'Best First'.
Re: More PDL issues (while running)->Found sollution
by jschollen (Beadle) on Feb 23, 2006 at 11:48 UTC
    In case one still gets an error when the jpeg libraries are compiled and netpbm is installed, the sollution may be found in the file PDL::IO::Pic.pm

    Change:
    1. PDL\IO\Pic.pm: line 102
    "my @path = split(/:/,$ENV{PATH});" with "my @path = split(/;/,$ENV{PATH});"
    2. PDL\IO\Pic.pm: line 107
    "$jpeg_conv="cjpeg" if(-x "$_/cjpeg");" with "$jpeg_conv="cjpeg" if(-x "$_/cjpeg.exe");"
    3. PDL\IO\Pic.pm: line 108
    "$jpeg_conv="pnmtojpeg" if(-x "$_/pnmtojpeg");" with "$jpeg_conv="pnmtojpeg" if(-x "$_/pnmtojpeg.exe");"

    Enjoy