Page 1 of 1

Copy attribute width to new image

Posted: 2014-09-10T07:30:23-07:00
by trebol-a
Well, I think it is a simple question, but I cannot get a solution... :?

How I can to create a new image with WIDTH x HEIGHT of other image.
I need to make something like:

Code: Select all

convert -size [otherPictureWidth]x[otherPictureHeight] xc:black dummy.jpg

Re: Copy attribute width to new image

Posted: 2014-09-10T07:48:02-07:00
by trebol-a
I solved with

Code: Select all

convert otherPicture.jpg -draw 'color 0,0 reset' dummy.jpg
but, how I can to create an image width the attributes of other image?

Re: Copy attribute width to new image

Posted: 2014-09-10T08:01:08-07:00
by snibgo
I would do it like this:

Code: Select all

convert in.png -fill black -colorize 100 out.png
out.png is then the same size as in.png, but entirely black.

Re: Copy attribute width to new image

Posted: 2014-09-10T08:23:50-07:00
by trebol-a
Thanx, is very similar at my solution... but how I can to use the responde of "identify myPicture.jpg" in a convert order?
Regards
snibgo wrote:I would do it like this:

Code: Select all

convert in.png -fill black -colorize 100 out.png
out.png is then the same size as in.png, but entirely black.