file name

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
ifkey
Posts: 8
Joined: 2018-08-23T11:50:07-07:00
Authentication code: 1152

file name

Post by ifkey » 2018-12-03T15:49:28-07:00

Hello

I am using image magic for windows and I have a problem renaming a file.

Code: Select all

convert %1 -resize 636x1281^^! -density 300x300 c:\mock\temp\iphone_x.png
composite -compose Dst_In  -gravity center C:\mock\mask.png c:\mock\temp\iphone_x.png -alpha Set  c:\mock\temp\iphone_x.png
composite -geometry  +433+98 c:\mock\temp\iphone_x.png c:\mock\1.png C:\mock\done.png
composite -compose Screen C:\mock\done.png c:\mock\2.png C:\mock\Final.png
I need to rename the final.png to the name% 1 and add _1.jpg

exemple
%1 = zazpp
final.png rename to zazpp_1.jpg

please help))

User avatar
fmw42
Posts: 25425
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: file name

Post by fmw42 » 2018-12-03T15:55:35-07:00

I do not use Windows, so I cannot help answer your question. But please always provide your IM version when asking a question.

If you use convert ... composite rather than composite, then you should be able to write you several commands as one long command line. See https://imagemagick.org/Usage/compose/#compose

ifkey
Posts: 8
Joined: 2018-08-23T11:50:07-07:00
Authentication code: 1152

Re: file name

Post by ifkey » 2018-12-03T16:04:20-07:00

ImageMagick 7.0.8-10 Q16 x64 2018-08-14

User avatar
fmw42
Posts: 25425
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: file name

Post by fmw42 » 2018-12-03T16:06:52-07:00

With ImageMagick 7, you should use magick not convert and if you still want to use composite, then it should be magick composite. Syntax has changed a bit for IM 7.

ifkey
Posts: 8
Joined: 2018-08-23T11:50:07-07:00
Authentication code: 1152

Re: file name

Post by ifkey » 2018-12-03T16:36:03-07:00

please help)

snibgo
Posts: 12032
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: file name

Post by snibgo » 2018-12-03T16:49:29-07:00

I'm not sure I understand. Instead of "final.png", you can use "%1_1.jpg". Does that answer the question?
snibgo's IM pages: im.snibgo.com

Post Reply