mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-14 15:45:15 +01:00
Just save the png data as-is (maybe fix later)
This commit is contained in:
parent
6fc380d2c8
commit
1bc324c982
@ -444,12 +444,14 @@ class Peer:
|
|||||||
entry = pkt.get_entry()
|
entry = pkt.get_entry()
|
||||||
self.srv.data_store.add_entry(self, entry.get_key() + self.data_key, entry)
|
self.srv.data_store.add_entry(self, entry.get_key() + self.data_key, entry)
|
||||||
|
|
||||||
if entry.get_key() == self.screenshot_key - self.data_key:
|
print entry.get_key(), self.screenshot_key, self.data_key
|
||||||
|
if entry.get_key() == self.screenshot_key:
|
||||||
|
print "Save it all"
|
||||||
try:
|
try:
|
||||||
which = random.randrange(0,12)
|
which = random.randrange(0,12)
|
||||||
img = image.image_from_data(entry.get_data())
|
f = open("%s%d.png" % (self.srv.image_dir, which), "w")
|
||||||
if img.interestingness > 0.4 or random.randrange(0, 10) < 2:
|
f.write(entry.get_data())
|
||||||
img.save("%s%d.png" % (self.srv.image_dir, which))
|
f.close()
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
log_info("Could not convert image data" + str(e))
|
log_info("Could not convert image data" + str(e))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user