1
0
Fork 0
mirror of https://gitlab.com/oloturia/fumcaso.git synced 2024-11-01 01:38:16 +01:00

Added object management

This commit is contained in:
oloturia 2019-09-17 16:33:43 +02:00
parent b1eb271df5
commit 8a96102ae1
12 changed files with 15 additions and 11 deletions

BIN
OBJ00.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
OBJ01.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2 KiB

BIN
OBJ02.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
OBJ03.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
OBJ04.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
OBJ05.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
OBJ06.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
OBJ07.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
OBJ08.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
OBJ09.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -1,3 +1,3 @@
A11.png,248,185
B13.png,256,159
B14.png,284,148
A11.png,248,185,OBJ00.png,OBJ01.png,OBJ02.png,OBJ03.png,OBJ04.png,OBJ05.png,OBJ06.png,OBJ07.png,OBJ08.png,OBJ09.png,
B13.png,256,159,OBJ00.png,OBJ01.png,OBJ02.png,OBJ03.png,OBJ04.png,OBJ05.png,OBJ06.png,OBJ07.png,OBJ08.png,OBJ09.png,
B14.png,284,148,OBJ00.png,OBJ01.png,OBJ02.png,OBJ03.png,OBJ04.png,OBJ05.png,OBJ06.png,OBJ07.png,OBJ08.png,OBJ09.png,

1 A11.png 248 185 OBJ00.png OBJ01.png OBJ02.png OBJ03.png OBJ04.png OBJ05.png OBJ06.png OBJ07.png OBJ08.png OBJ09.png
2 B13.png 256 159 OBJ00.png OBJ01.png OBJ02.png OBJ03.png OBJ04.png OBJ05.png OBJ06.png OBJ07.png OBJ08.png OBJ09.png
3 B14.png 284 148 OBJ00.png OBJ01.png OBJ02.png OBJ03.png OBJ04.png OBJ05.png OBJ06.png OBJ07.png OBJ08.png OBJ09.png

View file

@ -50,15 +50,19 @@ def fetchVign():
nvign +=1
return story
def addThing(vign):
#TODO
pass
def addThing(indVign):
with open("obj.csv") as obj:
csvReader = csv.reader(obj)
for row in csvReader:
if row[0] == indVign:
return row[random.randint(3,len(row)-1)],row[1],row[2]
return 0
def writeStrip(story):
strip = []
for indVign in story:
if indVign!="000":
vign = Image.open(indVign)
vign = Image.open(indVign).convert('RGBA')
addtext = ImageDraw.Draw(vign)
fnt = ImageFont.truetype("ubuntu.ttf",16)
if indVign[0] == 'A':
@ -71,11 +75,11 @@ def writeStrip(story):
addtext.multiline_text((int(textVign[0]),int(textVign[1])),textVign[4],fill="#000000",font=fnt,align="center")
addtext.multiline_text((int(textVign[2]),int(textVign[3])),textVign[5],fill="#000000",font=fnt,align="center")
obj = addThing(indVign)
if obj!=(0,0):
#TODO
pass
if obj!=0:
objImg = Image.open(obj[0])
vign.paste(objImg,(int(obj[1]),int(obj[2])))
strip.append(vign)
image = Image.new('RGB',(2400,500))
image = Image.new('RGBA',(2400,500))
xshift=0
for vign in strip:
image.paste(vign,(xshift,0))