png_files=$(ls ${dest}/${dest}-${group}-f*.png 2> /dev/null || echo "")
if [ x"${png_files}" != x"" ]; then
+ group_list="${group_list} ${group}"
+
log_dbg "generate_video start"
local outfile
fi
}
+function generate_global()
+{
+ local g
+ local w
+ local files
+ local group
+ local fname
+
+ log_dbg "generate_global: start"
+ log_dbg " list: ${group_list}"
+ log_dbg " max_nf: ${max_nf}"
+
+ for w in $(seq 1 ${max_nf}); do
+ files=""
+
+ for g in ${group_list}; do
+ group=${g}
+ fname=$(get_frame_name ${w})
+
+ if [ -f "${fname}" ]; then
+ files="${files} ${fname}"
+ fi
+ done
+
+ if [ "${files}" != "" ]; then
+ group="global"
+ fname=$(get_frame_name ${w})
+
+ if [ ${dry_run} -eq 1 ]; then
+ touch ${fname}
+ else
+ convert -colorspace sRGB -page +0+0 ${dest}/background-white.png \
+ ${files} -background none -layers merge \
+ PNG32:${fname}
+ fi
+ fi
+ done
+
+ group="global"
+ generate_video
+
+ log_dbg "generate_global: end"
+}
+
print_usage()
{
echo "${PROG_NAME} -- Générateur de séquence d'images PNG à partir d'un fichier Photoshop (PSD/PSB)."
# Remove background line:
${SED} -i -e /label:${bg_layer_name},.*/d ${layers}
- # Create background frame:
+ # Create transparent background frame:
convert -size ${size} xc:none ${dest}/background.png
+ # Create white background frame:
+ convert -size ${size} xc:white ${dest}/background-white.png
+
nf=""
max_nf="0"
oldnf=""
files=""
group="default"
+ group_list=""
while read l; do
scene=$(get_scene_id "${l}")
# Special case for last group...
generate_video
+
+generate_global