Closed Thread Icon

Topic awaiting preservation: perl Image Magic - need help with error (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12467" title="Pages that link to Topic awaiting preservation: perl Image Magic - need help with error (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: perl Image Magic - need help with error <span class="small">(Page 1 of 1)</span>\

 
sheepnepeople
Nervous Wreck (II) Inmate

From:
Insane since: Oct 2002

posted posted 10-11-2002 16:33

I installed Image Magic, but now when I run this script to test if it works

code:
#combines images

use strict;
use Image::Magick;

my $image = Image::Magick->new;
undef $image;

print "done.";

I get this error

code:
E:\jake\povray\tank>perl img.pl
Can't load 'E:/Perl/site/lib/auto/Image/Magick/Magick.dll' for module Image::Mag
ick: load_file:One of the library files needed to run this application cannot be
found at E:/Perl/lib/DynaLoader.pm line 206.
at img.pl line 4
Compilation failed in require at img.pl line 4.
BEGIN failed--compilation aborted at img.pl line 4.

The problem must be that I installed Image Magick to d, so why is it looking at e?

sheepnepeople
Nervous Wreck (II) Inmate

From:
Insane since: Oct 2002

posted posted 10-11-2002 19:24
quote:
the problem must be that I installed Image Magick to d, so why is it looking at e?

Its cause I installed perl there. And the dll exists... Now i'm confused.

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 10-11-2002 22:20

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

sheepnepeople
Nervous Wreck (II) Inmate

From:
Insane since: Oct 2002

posted posted 10-11-2002 22:37

I also have PSP, but besides doing by hand I don't think GIMP or PSP will do this. (Besides writing a script for GIMP) I can't really do it by hand since I'll have a lot of images.

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 10-11-2002 22:51

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 10-11-2002 23:11

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

sheepnepeople
Nervous Wreck (II) Inmate

From:
Insane since: Oct 2002

posted posted 10-12-2002 02:12

README, there wasn't a INSTALL said

quote:
installed from within this directory by executing the
command

ppm install Image-Magick.ppd

You should see output similar to:

Installing package 'Image-Magick.ppd'...
Writing C:\Perl\site\lib\auto\Image\Magick\.packlist
...\PerlMagick>

And that's exactly what happened.

Pov-ray's file output types are

quote:
+FC
Compressed Targa-24 format (RLE, run length encoded)

+FN
PNG (portable network graphics) format

+FP
Unix PPM format

+FS
System-specific such as Mac Pict or Windows BMP

+FT
Uncompressed Targa-24 format

Note: the obsolete +FD dump format and +FR raw format have been dropped because they were rarely used and no longer necessary. PPM, PNG, and system specific formats have been added. PPM format images are uncompressed, and have a simple text header, which makes it a widely portable image format.

So are you saying to use PPM? I don't see how this will help, unless if I append it to the previous image, and save it, will it be under the first, or will not work at all?

If this doesn't work I'm going to just have to install it on linux.

edit: i found somewhere in the docs that it doesn't like being on other drives than c, so I installed it there. Still doesn't work. Then at http://www.dylanbeattie.net/magick/debug.html it says to set MAGICK_HOME but to where?

[This message has been edited by sheepnepeople (edited 10-12-2002).]

Piper
Paranoid (IV) Inmate

From: California
Insane since: Jun 2000

posted posted 10-12-2002 03:16

I think you have a bad install of I::M. But first off, if you installed I::M to a location other than the standard perl library you need to tell perl where to look for it.

Try this:

code:
#combines images
use strict;
use lib qw{D:/path/to/ImageMagic};
#The path should point to the dir that contains the [b]Image[/b] dir
use Image::Magick;

my $image = new Image::Magick;
undef $image;
print "done.";



PPM is a tool used by ActiveState perl to install perl modules. If you installed I::M with PPM, it should have installed it into your standard library unless you specifically told it otherwise. That's what makes me believe you have a bad install. Your script should have died at line 3, not line 4 assuming thats all the code you used above. If my code doesn't work you should reinstall it. Run PPM from a command line again and remove I::M. The remove Image::Magick command will do the trick. Then use install Image::Magick to reinstall it.

quote:
edit: i found somewhere in the docs that it doesn't like being on other drives than c, so I installed it there. Still doesn't work. Then at http://www.dylanbeattie.net/magick/debug.html it says to set MAGICK_HOME but to where?



I think they are telling you to set an ENV variable. Open up a command prompt and type: set MAGICK_HOME=C:\path\to\dll's then try to run your script.

Let me know how it goes.

Regards,
Charlie

[This message has been edited by Piper (edited 10-12-2002).]

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 10-12-2002 05:54

did I miss part of this thread somewhere?



.:[ Never resist a perfect moment ]:.

Piper
Paranoid (IV) Inmate

From: California
Insane since: Jun 2000

posted posted 10-12-2002 06:04

I was thinking the same thing, bitdamaged. I had to read it a few times and even then I was looking for the post Grumble made that InI referred to. I'm still a little confused and I possibly made the thread even more difficult to follow

~CP



[This message has been edited by Piper (edited 10-12-2002).]

sheepnepeople
Nervous Wreck (II) Inmate

From:
Insane since: Oct 2002

posted posted 10-12-2002 06:43

It started as a povray post, then it was a different question, but somehow this happened. Just look here http://www.ozoneasylum.com/Forum11/HTML/000470.html

quote:
Your script should have died at line 3, not line 4 assuming thats all the code you used above.

It dies on the 4th line, the "use Image::Magick;" one

I've reinstalled Image Magick and the perl module for it using ppm several times, and tried what piper said.

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 10-12-2002 10:20

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 10-12-2002 11:29

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

sheepnepeople
Nervous Wreck (II) Inmate

From:
Insane since: Oct 2002

posted posted 10-13-2002 02:42
quote:
otherwise we won't be able to install it.
In Unix, you'd end up with something very similar.

I was installing the perl module from the command line. The problem is I can do this in linux, but some reason windows it doesn't work.

I've been searching, I can't find how to seperate the file header and the data in perl. If I understand you, the new file will have a new header, then just append the data of the rest of the images?

If I pipe the output to my script, and the script reads stdin, and I read it into an array, will the array be something like header1, data1, header2, data2?

[This message has been edited by sheepnepeople (edited 10-13-2002).]

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 10-14-2002 13:29

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 10-14-2002 16:26

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

thelocster
Obsessive-Compulsive (I) Inmate

From:
Insane since: Jul 2003

posted posted 07-09-2003 21:29

if you get the Can't load 'C:/Perl/site/lib/auto/Image/Magick/Magick.dll error and the install in ppm was successful, you need to check whether msvcr71.dll is copied to the winnt/system32 folder

i had the same problem but that seemed to have fixed it.

hyperbole
Paranoid (IV) Inmate

From: Madison, Indiana, USA
Insane since: Aug 2000

posted posted 07-10-2003 19:15

You need to add a line to your perl script that adds the directory where ImageMagic resides to the list of directories perl searches when looking for a library.

I spent a few minutes looking for an example but couldn't find one.

The line should look something like this:

push(@LIBS, "/path/to/ImageMagic/lib").

It has been a while since I used this and it may not be exactly right, but this should point you in the right direction.




-- not necessarily stoned... just beautiful.

« BackwardsOnwards »

Show Forum Drop Down Menu