Ecco i link dove scaricarlo:
- Windows: http://www.fehr-media.de/downloads/Keymaker_Windows.zip
- Mac: http://www.fehr-media.de/downloads/Keymaker_Mac.zip
put "1,2,3,4,5,6" into tempsort items of temp by random(6)split theList by return and returncombine theList by return and emptydelete the last char of theListLC_ALL= LC_NUMERIC=C
/opt/livecode/livecodecommunity-9.0.0-dp-1.x86_64/livecodecommunity.x86_64
import sys
import os
import Image
def modifica(filename, watermarkname):
photo = Image.open(filename)
watermark = Image.open(watermarkname)
Pwidth = photo.size[0]
Pheight = photo.size[1]
Wwidth = watermark.size[0]
Wheight = watermark.size[1]
x = (Pwidth/2)-(Wwidth/2)
y = (Pheight/2)-(Wheight/2)
photo.paste(watermark, (x, y), watermark)
photo.save(filename.split(".")[0]+"_watermark.jpg")
if len(sys.argv) < 3:
print "Esempio d'uso: python watermark.py foto.jpg watermark.png"
sys.exit()
foto = os.path.abspath(sys.argv[1])
watermark = os.path.abspath(sys.argv[2])
if os.path.isdir(foto):
for file in os.listdir(foto):
modifica(foto+"/"+file, watermark)
else:
modifica(foto, watermark)on OpenCard if $# <> 3 then put "Esempio d'uso: livecode -ui watermark.livecode foto.jpg watermark.png" quit 64 #command line usage error end if import paint from file $2 set the name of last image to watermark if last char of $1 is "/" then set the defaultFolder to $1 put files() into lista else put $1 into lista end if repeat for each line tFile in lista applicaW tFile end repeat quitend openCard
on applicaW tFile import paint from file tFile set the name of last image to foto set the loc of image watermark to the loc of image foto set itemdel to "." put item 1 of tFile into tFile export snapshot from rect (the rect of image foto) of this card to file ( tFile & "_watermark.jpg") as JPEG delete image foto end applicaWput $1 into indirizzo#web o locale?if (char 1 to 4 of $1) is not "http" then put "file:" before indirizzoput url indirizzo into paginaset itemdel to "="put the number of items of pagina into nnrepeat with i=1 to nn if (char -4 to -1 of item i of pagina ) = "href" then put word 1 of item (i+1) of pagina & return after listaLinkend repeatput listaLink