Exemplo n.º 1
0
        /// <summary>
        /// Overlay the text and/or image watermark over the image specified in the <paramref name="filePath" /> parameter and return.
        /// </summary>
        /// <param name="filePath">A string representing the full path to the image file
        /// (e.g. "C:\mypics\myprettypony.jpg", "myprettypony.jpg").</param>
        /// <param name="galleryId">The gallery ID. The watermark associated with this gallery is applied to the file.</param>
        /// <returns>
        /// Returns a System.Drawing.Image instance containing the image with the watermark applied.
        /// </returns>
        public static System.Drawing.Image AddWatermark(string filePath, int galleryId)
        {
            Watermark wm = Factory.GetWatermarkInstance(galleryId);

            return(wm.ApplyWatermark(filePath));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Overlay the text and/or image watermark over the image specified in the filePath parameter and return.
        /// </summary>
        /// <param name="filePath">A string representing the full path to the image file
        /// (e.g. "C:\mypics\myprettypony.jpg", "myprettypony.jpg").</param>
        /// <returns>Returns a System.Drawing.Image instance containing the image with the watermark applied.</returns>
        public static System.Drawing.Image AddWatermark(string filePath)
        {
            Watermark wm = Watermark.Instance;

            return(wm.ApplyWatermark(filePath));
        }