Attempting to convert image on a shared drive

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
kgt882
Posts: 4
Joined: 2016-07-07T09:33:10-07:00
Authentication code: 1151

Attempting to convert image on a shared drive

Post by kgt882 »

I am trying to use this line of code to convert an image using a .bat file. I put it in a locally shared hard drive and wish for everyone to be able to use it WITHOUT making everyone download image-magick. So I pasted the image-magick file into the S:\ and it still only works for me since I have it downloaded. I was wondering if I can call the convert.exe method in the image-magick folder in order to make it so that everyone can convert an image without downloading imagemagick.

convert "%1" -thumbnail 610x -unsharp 1.5x1.2+1.0+0.10 "%~p1resizedxLarge_%~n1.jpg"

^This code above only works IF image-magick is installed on my pc.

ALSO: Different people have a different folder hierarhcy. I tried

..\ImageMagick\convert

but this error came up:

convert: RegistryKeyLookupFailed 'CoderModulesPath'
@error.module.c/GetMagick... etc

CURRENTLY I HAVE:

set ..\ImageMagick\=%%MAGICK_CODER_MODULE_PATH%%;
echo %%MAGICK_CODER_MODULE_PATH%%
convert "%1" -thumbnail 610x -unsharp 1.5x1.2+1.0+0.10 "%~p1resizedxLarge_%~n1.jpg"

but still doesn't work for those who don't have ImageMagick installed even though it's on the shared drive.

Thanks, in advance

UPDATE: I installed the portable version of Image Magick into the shared drive. Sadly, no results.
Last edited by kgt882 on 2016-07-08T05:49:17-07:00, edited 1 time in total.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Attempting to convert image on a shared drive

Post by snibgo »

set ..\ImageMagick\=%%MAGICK_CODER_MODULE_PATH%%;
That doesn't make any sense. You have defined an environment variable called "..\ImageMagick\"? Why?
snibgo's IM pages: im.snibgo.com
kgt882
Posts: 4
Joined: 2016-07-07T09:33:10-07:00
Authentication code: 1151

Re: Attempting to convert image on a shared drive

Post by kgt882 »

its because we don't have the same file path in our shared drive
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Attempting to convert image on a shared drive

Post by snibgo »

You problem seems to be about management of multiple computers running programs from a shared drive. The problem seems to be general, and not specific to ImageMagick.

Can you set up your computers so they can run any program at all from a shared drive? Once you can do that, feel free to ask questions about ImageMagick.
snibgo's IM pages: im.snibgo.com
kgt882
Posts: 4
Joined: 2016-07-07T09:33:10-07:00
Authentication code: 1151

Re: Attempting to convert image on a shared drive

Post by kgt882 »

ANSWER:
I installed ImageMagick Portable onto my shared drive.
Then I placed my folder with the .bat files into a folder in the same shared drive.
I then copy pasted convert.exe into the folder with the bat files in it and it started working.
Thanks for the attempt on helping!
Post Reply