подскажи плз по графике - Форум успешных вебмастеров - GoFuckBiz.com
 
 
Форум успешных вебмастеров - GoFuckBiz.com

  Форум успешных вебмастеров - GoFuckBiz.com > Бизнес-решения > Скрипты, программы и технические решения
Дата
USD/RUB93.4409
BTC/USD64075.8230
Скрипты, программы и технические решения Обсуждаем скрипты, программы и новые технологии.

Закрытая тема
Опции темы Опции просмотра
Старый 10.01.2011, 02:06   #1
dim7
Senior Member
 
Аватар для dim7
 
Регистрация: 22.08.2008
Сообщений: 927
Бабло: $173840
По умолчанию подскажи плз по графике

подскажи плз по графике,
есть spd файлик в нем слой как картинка и слой как ватермарк,
нужно группе фоток добавить ватермарк .
если в редакторе скопировать слой к файлу, ватермарк получается белый,
если к ватермарку скопировать слой с фоткой, то прозрачный.
нужен прозрачный, но так костылят я замучаюсь.

Можно win но лучше nix решение
__________________
LoadedCash - вечные ребилы -|- Налят Сюда
dim7 вне форума  
Старый 10.01.2011, 02:08   #2
dovgan
Senior Member
 
Аватар для dovgan
 
Регистрация: 07.02.2008
Адрес: online
Сообщений: 876
Бабло: $143415
По умолчанию

php+GD2
dovgan вне форума  
Старый 10.01.2011, 02:16   #3
dim7
Senior Member
 
Аватар для dim7
 
Регистрация: 22.08.2008
Сообщений: 927
Бабло: $173840
ТС -->
автор темы ТС По умолчанию

Цитата:
Сообщение от dovgan Посмотреть сообщение
php+GD2
это сложно для меня
нашел такой скрипт, но он делает белым (
Цитата:
#!/bin/sh
# Script Name: Batch Watermark Script v1.0 Gnome Linux Zenity
# Author: nubuntu
# Credit: Linerd http://tuxtweaks.com
# Contact: [email protected]
# Homepage: http://ohbuntu.blogspot.com
# Require: Zenity, ImageMagick, coreutils
# License: Creative Commons Attribution - Share Alike 3.0 http://creativecommons.org/licenses/by-sa/3.0/
# You are free to use and/or modify this script. If you choose to distribute this script, with or
# without changes, you must attribute credit to the author listed above.

# Initiate watermarking?
ans=$(zenity --question \
--title "Batch Watermark" \
--text="You are about to watermark all image files in this folder. This script will NOT delete original images. New set of watermarked images will be placed in a new folder. Cancel to quit this script. OK to continue and select an image as watermark"; echo $?

if [ "$ans" = 0 ]; then

# Watermark image path entry
WMIMAGE=$(zenity --file-selection \
--title "Batch Watermark" \
--text="Select watermark image file:");

# This sets the scale % of your watermark image
SCALE=$(zenity --scale --min-value=10 --max-value=500 --value=100 --step 10 \
--title='Batch Watermark' --text='Size of watermark image (%):' );

# This sets the opacity % of your watermark image
OPACITY=$(zenity --scale --min-value=10 --max-value=100 --value=50 --step 5 \
--title='Batch Watermark' --text='Opacity of watermark image (%):');

# This sets gravity of watermark
GRAVITY=$(zenity --list \
--width=300 \
--height=340 \
--title "Batch Watermark" \
--text "Select watermark position:" \
--column "Command" --column "Position" --hide-column "1" \
Center "Center" \
North "Top" \
NorthEast "Top Right" \
East "Right" \
SouthEast "Bottom Right" \
South "Bottom" \
SouthWest "Bottom Left" \
West "Left" \
NorthWest "Top Left" );

# Find all image files in current directory and watermark.
file -i * | grep image | awk -F':' '{ print $1 }' | while read IMAGE
do
name=`echo $IMAGE | cut -f1 -d.`
ext=`echo $IMAGE | cut -f2 -d.`
composite -dissolve $OPACITY% -gravity $GRAVITY -geometry +0+0 -quality 100 \( $WMIMAGE -resize $SCALE% \) "$IMAGE" "${name}_wm.${ext}" | zenity --progress --pulsate --width=300 --title "Batch Watermark" --text="Processing..." --auto-close --auto-kill
if [ "$?" != 0 ]; then
zenity --error \
--text="Process failed!" --title "Batch Watermark"
exit 1
fi
done
# Move images to Watermarked directory
mkdir Watermarked
mv *_wm.* Watermarked
cd Watermarked/
date | tee -a wm_imagelist.txt
file -i * | grep image | tee -a wm_imagelist.txt | zenity --info --width=200 --title "Batch Watermark" --text="Process completed" --timeout=10

else
zenity --info --timeout=2 \
--title "Batch Watermark" \
--text "Batch Watermark Script cancelled!"
fi
exit 0
__________________
LoadedCash - вечные ребилы -|- Налят Сюда
dim7 вне форума  
Старый 10.01.2011, 12:06   #4
chesser
автоматизирую интернеты
 
Аватар для chesser
 
Регистрация: 05.07.2009
Адрес: chesser.ru
Сообщений: 3,362
Бабло: $470735
По умолчанию

если под никс, то смотри в сторону imagemagick
__________________
USA и NL серверы и VPS | wiki | блог | Drupal | NginxТДС
Ave, Google, morituri te salutant! © chesser
chesser вне форума  
Старый 10.01.2011, 14:03   #5
dovgan
Senior Member
 
Аватар для dovgan
 
Регистрация: 07.02.2008
Адрес: online
Сообщений: 876
Бабло: $143415
По умолчанию

Цитата:
Сообщение от dim7
это сложно для меня
вот неплохо расписано: jeka911.wordpress.com/2007/09/25/3_ways_to_add_watermark_to_image_in_php/
сам когда-то юзал php+GD2, как и сказал chesser - смотри в сторону imagemagick, хотя фактически мы одно и тоже говорим, т.к. GD использует imagemagick
dovgan вне форума