Convert and draw same command issue
Convert and draw same command issue
This i my first post and I could not find the answer.
I am using Windows XP to run IM. I have an image that I am trying to put a blank image over a certain area. I have created a blank image 1x1 I go to my directory and run the command below and get the error also below
convert card.png -draw 'image SrcOver 0,65 1000,1000 point.png' cardnew.png
C:\testi[/color]ng>convert card.png -draw 'image SrcOver 0,65 1000,1000 point.png' cardn
ew.png
convert.exe: Non-conforming drawing primitive definition `image' @ error/draw.c/
DrawImage/3146.
convert.exe: unable to open image `SrcOver': No such file or directory @ error/b
lob.c/OpenBlob/2617.
convert.exe: no decode delegate for this image format `SrcOver' @ error/constitu
te.c/ReadImage/533.
convert.exe: unable to open image `0,65': No such file or directory @ error/blob
.c/OpenBlob/2617.
convert.exe: no decode delegate for this image format `0,65' @ error/constitute.
c/ReadImage/533.
convert.exe: unable to open image `1000,1000': No such file or directory @ error
/blob.c/OpenBlob/2617.
convert.exe: no decode delegate for this image format `1000,1000' @ error/consti
tute.c/ReadImage/533.
convert.exe: unable to open image `point.png'': No such file or directory @ erro
r/blob.c/OpenBlob/2617.
convert.exe: no decode delegate for this image format `point.png'' @ error/const
itute.c/ReadImage/533.
convert.exe: Non-conforming drawing primitive definition `image' @ error/draw.c/
DrawImage/3146.[/color]
Can anyone tell me what I am doing wrong?
Thank you
I am using Windows XP to run IM. I have an image that I am trying to put a blank image over a certain area. I have created a blank image 1x1 I go to my directory and run the command below and get the error also below
convert card.png -draw 'image SrcOver 0,65 1000,1000 point.png' cardnew.png
C:\testi[/color]ng>convert card.png -draw 'image SrcOver 0,65 1000,1000 point.png' cardn
ew.png
convert.exe: Non-conforming drawing primitive definition `image' @ error/draw.c/
DrawImage/3146.
convert.exe: unable to open image `SrcOver': No such file or directory @ error/b
lob.c/OpenBlob/2617.
convert.exe: no decode delegate for this image format `SrcOver' @ error/constitu
te.c/ReadImage/533.
convert.exe: unable to open image `0,65': No such file or directory @ error/blob
.c/OpenBlob/2617.
convert.exe: no decode delegate for this image format `0,65' @ error/constitute.
c/ReadImage/533.
convert.exe: unable to open image `1000,1000': No such file or directory @ error
/blob.c/OpenBlob/2617.
convert.exe: no decode delegate for this image format `1000,1000' @ error/consti
tute.c/ReadImage/533.
convert.exe: unable to open image `point.png'': No such file or directory @ erro
r/blob.c/OpenBlob/2617.
convert.exe: no decode delegate for this image format `point.png'' @ error/const
itute.c/ReadImage/533.
convert.exe: Non-conforming drawing primitive definition `image' @ error/draw.c/
DrawImage/3146.[/color]
Can anyone tell me what I am doing wrong?
Thank you
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert and draw same command issue
See the syntax at http://www.imagemagick.org/Usage/layers/#draw. You need double quotes outside for the draw command and single quotes about your image.
But I am not sure you can draw a transparent image into another image that way. I could be wrong.
For other ways to draw a rectangular "hole" see
http://www.fmwconcepts.com/imagemagick/ ... nsert_hole
http://www.imagemagick.org/Usage/compose/#copy
http://www.imagemagick.org/Usage/compose/#dstout
http://www.imagemagick.org/Usage/draw/#matte
But I am not sure you can draw a transparent image into another image that way. I could be wrong.
For other ways to draw a rectangular "hole" see
http://www.fmwconcepts.com/imagemagick/ ... nsert_hole
http://www.imagemagick.org/Usage/compose/#copy
http://www.imagemagick.org/Usage/compose/#dstout
http://www.imagemagick.org/Usage/draw/#matte
Re: Convert and draw same command issue
Thank you so much that did it. Yes this worked it covered the image thank you again
C:\testing>convert card.png -draw "image SrcOver 0,65 1000,1000 'point.png'" car
dnew.png
C:\testing>convert card.png -draw "image SrcOver 0,65 1000,1000 'point.png'" car
dnew.png
Re: Convert and draw same command issue
Since I have you any idea the command to do this in batches?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert and draw same command issue
hcorreia wrote:Since I have you any idea the command to do this in batches?
see mogrify
http://www.imagemagick.org/Usage/basics/#mogrify
http://www.imagemagick.org/Usage/basics ... fy_compose
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert and draw same command issue
That command does not work for me using a fully transparent point.png! Is your point.png transparent?hcorreia wrote:Thank you so much that did it. Yes this worked it covered the image thank you again
C:\testing>convert card.png -draw "image SrcOver 0,65 1000,1000 'point.png'" car
dnew.png
In fact, there is no src_over listed at http://www.imagemagick.org/Usage/compose/
Re: Convert and draw same command issue
card.png is the original image before command execution. I created small point.png (1x1) of white color to use in below command. Below is the command which fulfills over requirement.
convert card.png -draw "image SrcOver 0,65 1000,1000 'point.png"' car
dnew.jpeg
convert card.png -draw "image SrcOver 0,65 1000,1000 'point.png"' car
dnew.jpeg
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert and draw same command issue
hcorreia wrote:card.png is the original image before command execution. I created small point.png (1x1) of white color to use in below command. Below is the command which fulfills over requirement.
convert card.png -draw "image SrcOver 0,65 1000,1000 'point.png"' car
dnew.jpeg
For me it does not make it transparent, simply white. Is that what you wanted. I thought your original post was about making a transparent section inside an image. Perhaps I misunderstood what you meant by "blank".
Re: Convert and draw same command issue
Sorry for the confusion. I have an index card and needed to blank information or cover it up and only leave the header. The command did that after your correction of course. I cant post files or else I would have post before and after.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Convert and draw same command issue
hcorreia wrote:This i my first post and I could not find the answer.
I am using Windows XP to run IM. I have an image that I am trying to put a blank image over a certain area. I have created a blank image 1x1 I go to my directory and run the command below and get the error also below
convert card.png -draw 'image SrcOver 0,65 1000,1000 point.png' cardnew.png
C:\testi[/color]ng>convert card.png -draw 'image SrcOver 0,65 1000,1000 point.png' cardn
ew.png
convert.exe: Non-conforming drawing primitive definition `image' @ error/draw.c/
DrawImage/3146.
...[/color]
Can anyone tell me what I am doing wrong?
Thank you
You did not add single or double quotes around the filename in the draw.
However is their some reason you specifically want to overlay using draw? By not use -composite
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Convert and draw same command issue
Thre is no reason really, I guess I thought this was the correct way of doing this.
How can I redirect the output file to a different folder, do you know?
How can I redirect the output file to a different folder, do you know?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert and draw same command issue
if using convert, then just put the path to the output image in your commandhcorreia wrote:Thre is no reason really, I guess I thought this was the correct way of doing this.
How can I redirect the output file to a different folder, do you know?
convert image ..... path2newdirectory/outputimage
Re: Convert and draw same command issue
Ok that makes since but do I need to cd like the command below?
convert card.png -draw 'image SrcOver 0,65 1000,1000 point.png' cd../newpath/cardnew.png
Thank you again
convert card.png -draw 'image SrcOver 0,65 1000,1000 point.png' cd../newpath/cardnew.png
Thank you again
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Convert and draw same command issue
hcorreia wrote:Ok that makes since but do I need to cd like the command below?
convert card.png -draw 'image SrcOver 0,65 1000,1000 point.png' cd../newpath/cardnew.png
Thank you again
No leave off the cd..
convert card.png -draw 'image SrcOver 0,65 1000,1000 point.png' /newpath/cardnew.png
The directory must exist already and must have write permissions.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Convert and draw same command issue
The other technique is to use "mogrify" whcih has a output -path option
However it will generally only use the same basename as the input image.
But mogrify can process multiple images in the same directory.
http://www.imagemagick.org/Usage/basics/#mogrify
However it will generally only use the same basename as the input image.
But mogrify can process multiple images in the same directory.
http://www.imagemagick.org/Usage/basics/#mogrify
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/