Closed GoogleCodeExporter closed 9 years ago
Hello Hardy:
Thanks for the report, could you send a patch in a diff format?
Also, if you can include a test case that would help too, i.e.:
http://code.google.com/p/pyfpdf/source/browse/tests/issue14.py
If you want, I can give you commit access so you can send your changes directly.
Original comment by reingart@gmail.com
on 5 Dec 2012 at 4:01
[deleted comment]
I created the patch file. I haven't created the test case yet however. I'll
have to mess with that later.
Original comment by hardy.ke...@gmail.com
on 7 Dec 2012 at 10:30
Attachments:
Thanks, it is more clean now.
Maybe f.close should be in the finally clause (or outside the exception block).
It is a bit repetitive.
I think it could be closed just after getting the name (f.name).
Also, please try to catch the exact exception (ValueError or whatever PIL is
raising, to avoid side-effects with IOErrors and other problems).
Original comment by reingart@gmail.com
on 8 Dec 2012 at 4:26
Why not to test key "transparency" in info list
like
f = tempfile.NamedTemporaryFile(delete=False, suffix=".png")
tmp = f.name
f.close()
if "transparency" in im.info:
transparency = im.info['transparency']
im.save(tmp, transparency=transparency)
else:
im.save(tmp)
info = self._parsepng(tmp)
Original comment by romiq...@gmail.com
on 8 Jan 2013 at 11:56
yes romiq.kh, your patch looks better, it would be wise to make a test with
this gif file, sorry I didin't have time...
Original comment by reingart@gmail.com
on 8 Jan 2013 at 4:33
hardy.kevin.c, can we use this sample gif as example?
Propose + test + test images in attachment
Original comment by romiq...@gmail.com
on 9 Jan 2013 at 11:44
Attachments:
This test requires two additional GIF pictures:
1. put them (maybe repaint) in examples folder?
2. generate from test file on-the-fly?
3. or Something Completely Different?
Original comment by romiq...@gmail.com
on 18 Jan 2013 at 12:21
Sorry, I don't fully understand.
I think you can copy all required files in the test or example directory.
Original comment by reingart@gmail.com
on 18 Jan 2013 at 3:58
So, this slightly updated test code. No external gif file required.
Standalone test file also included.
Can i merge this?
Original comment by romiq...@gmail.com
on 22 Jan 2013 at 11:02
Attachments:
Oops, forgot about first line description in issue33.py.
Original comment by romiq...@gmail.com
on 22 Jan 2013 at 11:05
Attachments:
It looks nice!go ahead with the commit to close this issue, thanks to all for
the collaboration.
Original comment by reingart@gmail.com
on 22 Jan 2013 at 2:36
Fixes committed.
Original comment by romiq...@gmail.com
on 22 Jan 2013 at 7:06
Original issue reported on code.google.com by
hardy.ke...@gmail.com
on 5 Dec 2012 at 12:32Attachments: