Page 1 of 1
Reszie overlay and output
Posted: 2012-09-25T10:05:11-07:00
by Thunder07
hi,
im trying to combine 2 images, resizing the 1st and the output...
i got close enough but not quite right
Code: Select all
composite ( -gravity center -geometry +0+0 -resize 80x80 charge.png ) ( full.png ) out.png

this will resize the overlay charge.png but not the output...
when i try this
Code: Select all
composite ( -gravity center -geometry +0+0 -resize 80x80 charge.png ) ( full.png ) -resize 48x48 out.png

it reszie but the ratio of the overlay get messed up....
the overlay appears much bigger then it should,
i know i could have a 2nd line to do the resizing of the output which would solve the problem,
but i much prefer to have it in the one command if possible
Re: Reszie overlay and output
Posted: 2012-09-25T10:30:14-07:00
by fmw42
Post links to your two input images and show an example of what you want for the output. We can probably help you with the command line once we understand what the issue is.
In the meantime see the geometry modifiers at
http://www.imagemagick.org/script/comma ... p#geometry
Re: Reszie overlay and output
Posted: 2012-09-25T12:10:58-07:00
by Thunder07
fmw42 wrote:Post links to your two input images and show an example of what you want for the output. We can probably help you with the command line once we understand what the issue is.
In the meantime see the geometry modifiers at
http://www.imagemagick.org/script/comma ... p#geometry
these are the 2 output images,


i'm trying to resize the charge/bolt place it on the battery and resize the whole thing
and this is how it should/ i want it to look

Re: Reszie overlay and output
Posted: 2012-09-25T12:37:29-07:00
by Bonzo
Try:
Code: Select all
convert http://i46.tinypic.com/2874h2.png ( http://i47.tinypic.com/5nvgh4.png -resize x75 ) -gravity center -composite -resize x23 battery.png
I would look at changing the "lightning bolt" colour or the battery colour as you can hardly see the "lightning bolt".
Re: Reszie overlay and output
Posted: 2012-09-25T12:43:21-07:00
by fmw42
The problem is that composite it too old and inflexible and the -resize before the output is causing trouble. Try using the more modern and more flexible convert ... -composite syntax.
convert ( full.png ) ( charge.png -resize 80x80 ) -gravity center -compose over -composite -resize 48x48 out.png
see
http://www.imagemagick.org/Usage/layers/#convert
OOPS: Sorry Bonzo, you posted something similar while I was composing my reply.
Re: Reszie overlay and output
Posted: 2012-09-25T14:12:02-07:00
by Thunder07
Bonzo wrote:Try:
Code: Select all
convert http://i46.tinypic.com/2874h2.png ( http://i47.tinypic.com/5nvgh4.png -resize x75 ) -gravity center -composite -resize x23 battery.png
I would look at changing the "lightning bolt" colour or the battery colour as you can hardly see the "lightning bolt".
thanks,
i'm not really worried too much about visibility as the size (or colour as you suggested and the battery picture would also be different) can fix that,
i'm building a tool with a resizing option and the bolt is changable by the user
fmw42 wrote:The problem is that composite it too old and inflexible and the -resize before the output is causing trouble. Try using the more modern and more flexible convert ... -composite syntax.
convert ( full.png ) ( charge.png -resize 80x80 ) -gravity center -compose over -composite -resize 48x48 out.png
see
http://www.imagemagick.org/Usage/layers/#convert
OOPS: Sorry Bonzo, you posted something similar while I was composing my reply.
Thanks just the same.
i've been trying to get this to work for a while now,
and this works just the way it should
