Page 1 of 1
Add custom background to pngs
Posted: Tue May 21, 2024 10:11 am
by JuanMi73
Hello.
Is it possible to create a batch process to add a custom background to multiple pngs?
Thanks!!
.
Re: Add custom background to pngs
Posted: Tue May 21, 2024 10:42 am
by cday
JuanMi73 wrote: Tue May 21, 2024 10:11 am
Is it possible to create a batch process to add a custom background to multiple pngs?
I think not: it would be possible if the Batch convert 'Watermark' function had an option to use loaded input files as the 'watermark' on a selected fixed background, rather than applying a fixed watermark to all loaded input files.
This situation arises occasionally, and I think the possibility of including such an option was discussed once, so if it might be worth making a suggestion to add one. Edit: I have made a suggestion:
Batch convert 'Watermark option' - Add option to apply loaded images to a fixed background.
This should, however, be possible using an NConvert script that applies each loaded input file as a 'watermark' to a fixed custom background.
Re: Add custom background to pngs
Posted: Tue May 21, 2024 11:07 am
by cday
@JuanMi73: See my edit above, I have made the suggestion.
Re: Add custom background to pngs
Posted: Tue May 21, 2024 11:54 am
by JuanMi73
cday wrote: Tue May 21, 2024 11:07 am
@JuanMi73: See my edit above, I have made the suggestion.
Thanks cday
Edit: I have been able to do it with nconvert and batch file.
All my images in png to webp adding a "background.webp"
Thanks again!!
Code: Select all
@echo off
cd %~dp0
for %%x in (*.png) do (
nconvert -quiet -overwrite -wmopacity 100 -wmflag center -wmfile "%%x" -out webp -q 80 -o "%%~nx.webp" background.webp
)