ReptarX / pyfpdf

Automatically exported from code.google.com/p/pyfpdf
GNU Lesser General Public License v3.0
0 stars 0 forks source link

_parsegif and _parsejpg doesn't download the images #25

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
_parsegif and _parsejpg doesn't download the image. _parsepng starts with:

if name.startswith("http://") or name.startswith("https://"):
            import urllib
            f = urllib.urlopen(name)

which is missing from _parsegif and _parsejpg. This is a bit unexpected since 
http://code.google.com/p/pyfpdf/wiki/Image just generally says putting in a 
link works.

Original issue reported on code.google.com by kitsu...@gmail.com on 13 Sep 2012 at 9:01

GoogleCodeExporter commented 9 years ago
Yes, but parsejpg uses seek that is not supported in urlopen
_parsegif uses a temporary file, so we could do that for _parsejpg too

Original comment by reingart@gmail.com on 5 Feb 2014 at 5:05