Page 1 of 1

Convert : unable to open image... invalid argument. (beginne

Posted: 2007-05-29T07:09:25-07:00
by kostina
Hello,

I'm just discover ImageMagick. Fantastic !!!
I learn with Windows XP (binary version).
Only, the syntax is not simple for me :
For that the example below works :
convert rose: \( +clone -channel R -fx B \) \
+swap -channel B -fx v.R fx_rb_swap.gif
I've had to delete the 3 "\".
So, if I use a picture present in the directory "images" like rose, it works.

But if I want to use my own picture that I've placed inside this directory, like that, after the command prompt :
convert myPhoto: ( +clone -channel R -fx G ) +swap -channel G -fx v.R myPhotoGreen.gif
I get this message :
> convert: unable to open image 'myPhoto:' : invalid argument...
I'm looking for since 2 days unsuccessfully ;-(

Better, I used successfully this name of file for another operation !
What I'v missed ?!

Thanks
Rosa

Re: Convert : unable to open image... invalid argument. (beginne

Posted: 2007-05-29T08:54:38-07:00
by Bonzo
I have not used windows but assume you will need the full path to the image not the relative path. Something like c:\folder name\image.jpg and the same for saving it.
Also you use image: for the built in images not your images.

Code: Select all

convert c:\folder name\myPhoto.jpg ( +clone -channel R -fx G ) +swap -channel G -fx v.R c:\folder name\myPhotoGreen.gif

Re: Convert : unable to open image... invalid argument. (beginne

Posted: 2007-05-29T09:09:39-07:00
by kostina
No it doesn't work. Always the same problem.
First, there's error with "Program Files" for the blank.
Then, I've got placed my picture in the directory images of the program, where there the pictures of the program (exemple : rose...). So, IM knows the path by default ?!
Since, I've got the same command with others pictures of IM in his directoriy : it doesn't work, except for rose ?!

I don't understand anything.

Rosa

Re: Convert : unable to open image... invalid argument. (beginne

Posted: 2007-05-29T11:15:41-07:00
by Bonzo
This works for me:

1/ Open Command prompt.

2/ Using cd directory name get to the directory with the original image in - in my case I went
cd \ to take me back to the root.
Then after the c:\ prompt
cd Documents and Settings\Barney\My Documents

You can look at image properties to find the path you need.

3/ I then ran convert test.jpg -resize 50x50 output.gif

I now have an image called output.gif in the My Documents folder.

The Rose image may work as it is hard coded into the software somewhere?

Re: Convert : unable to open image... invalid argument. (beginne

Posted: 2007-05-29T11:50:47-07:00
by kostina
It seems to me that I don't understand what you wrote. The 2/ part in fact.
The path where are the pictures by default is :
C:\Program Files\ImageMagick-6.3.4-Q16\images

So, Program Files gets an error because of the blank beetwen the 2 words.
I let the install place the program IM as it was proposed.
Do have I understand that I should reinstall IM outside the Program Files ?

Rosa

Re: Convert : unable to open image... invalid argument. (beginne

Posted: 2007-05-29T11:54:25-07:00
by Bonzo
How are you running your code ? I was using the command prompt screen.

cd \

cd Program Files\ImageMagick-6.3.4-Q16\images

convert image.jpg -resize 50x50 output.gif

Should create an image called output.gif from image.jpg in the folder C:\Program Files\ImageMagick-6.3.4-Q16\images

Re: Convert : unable to open image... invalid argument. (beginne

Posted: 2007-05-29T12:36:42-07:00
by kostina
cd:\> Program Files\ImageMagick-6.3.4-Q16\images
get a message error :
'Program' is not a internal command, or extrnal or a executable... (I translate form french).

Rosa

Re: Convert : unable to open image... invalid argument. (beginne

Posted: 2007-05-29T13:16:22-07:00
by Bonzo
You are not doing what I wrote; this is what you should be seeing:
http://www.rubblewebs.co.uk/TESTS/kostina.php

Replace the filenames on this line with your filenames: convert image.jpg -resize 50x50 output.gif

Re: Convert : unable to open image... invalid argument. (beginne

Posted: 2007-05-29T14:02:03-07:00
by kostina
Ok, I forgot
Type convert image.jpg -resize 50x50 output.gif

Re: Convert : unable to open image... invalid argument. (beginne

Posted: 2007-05-29T23:12:55-07:00
by kostina
I did a error and the message is away yesterday : I was very tried after 10 heures behind the screen...

I tried as you told.
To resizing, it works. But if I want apply the example to transform the chromatic, I've got the same message after having indicate the good directory as you indicated me.
(convert rose: \( +clone -channel R -fx B \) \
+swap -channel B -fx v.R fx_rb_swap.gif)

I don't understand anything... :(

Rosa

Re: Convert : unable to open image... My fault !

Posted: 2007-05-30T00:29:50-07:00
by kostina
It's my fault !!!
after the name of the file input, I wrote ":" as the exemple (rose: by default).
I don't know his significant yet, but I understand.
Thanks ever so much to you because I was ready to abandon without your help.

Rosa

Re: Convert : unable to open image... invalid argument. (beginne

Posted: 2007-05-30T11:04:48-07:00
by Bonzo
I am glad you got it working in the end :D