Blame Scripts/Functions/Render/render_mogrifyCommentToPng.sh

204a0d
#!/bin/bash
204a0d
#
204a0d
# render_mogrifyCommentToPng.sh -- This function provides
204a0d
# post-rendition to write a commentary in PNG images produced as
204a0d
# result of centos-art.sh base-rendition action. The commentary is
204a0d
# written in the image datastream and can be seen using the command
204a0d
# `identify -verbose file.png'.
204a0d
#
204a0d
# Copyright (C) 2009-2011 Alain Reguera Delgado
fa95b1
#
fa95b1
# This program is free software; you can redistribute it and/or modify
fa95b1
# it under the terms of the GNU General Public License as published by
fa95b1
# the Free Software Foundation; either version 2 of the License, or
fa95b1
# (at your option) any later version.
fa95b1
#
204a0d
# This program is distributed in the hope that it will be useful, but
204a0d
# WITHOUT ANY WARRANTY; without even the implied warranty of
204a0d
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
204a0d
# General Public License for more details.
204a0d
#
204a0d
# You should have received a copy of the GNU General Public License
204a0d
# along with this program; if not, write to the Free Software
204a0d
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
204a0d
# USA.
204a0d
# ----------------------------------------------------------------------
204a0d
# $Id$
204a0d
# ----------------------------------------------------------------------
204a0d
204a0d
function render_mogrifyCommentToPng {
204a0d
cbed78
    # Define commentary you want to write on PNG images.
cbed78
    local COMMENT="`gettext "Created in CentOS Artwork Repository"` (https://projects.centos.org/svn/artwork/)."
204a0d
204a0d
    # Check base file existence.
204a0d
    cli_checkFiles ${FILE}.png 'f'
204a0d
cbed78
    # Write commentary to PNG image.
cbed78
    mogrify -comment "$COMMENT" ${FILE}.png
204a0d
204a0d
}