Copy attribute width to new image

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
trebol-a
Posts: 6
Joined: 2012-01-18T08:13:42-07:00
Authentication code: 8675308

Copy attribute width to new image

Post 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
trebol-a
Posts: 6
Joined: 2012-01-18T08:13:42-07:00
Authentication code: 8675308

Re: Copy attribute width to new image

Post 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?
Last edited by trebol-a on 2014-09-10T08:20:58-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: Copy attribute width to new image

Post 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.
snibgo's IM pages: im.snibgo.com
trebol-a
Posts: 6
Joined: 2012-01-18T08:13:42-07:00
Authentication code: 8675308

Re: Copy attribute width to new image

Post 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.
Post Reply