Closed GoogleCodeExporter closed 9 years ago
Never mind it, false positive. Twitter.png's color-depth is 32-bit, which
according to your wiki isn't supported. Maximum supported png color-depth is
24-bit.
Original comment by step.l...@gmail.com
on 29 Oct 2013 at 4:06
It alpha channel should be supported in recents versions, did you download the
lates source code from the repository?
Do you have PIL installed?
Original comment by reingart@gmail.com
on 29 Oct 2013 at 6:03
Yes, I have PIL installed, why does FPDF rely on it?
As for source code, I'm using the whatever - I think it's actually 1.7.1 - FPDF
version bundled with web2py 2.6.4-stable in contrib/fpdf. Are you suggesting I
should download the FPDF source and replace contrib/fpdf? Thanks.
Original comment by step.l...@gmail.com
on 29 Oct 2013 at 6:51
I checked the latest source in here (August 15, 2013
http://code.google.com/p/pyfpdf/source/detail?r=28db709a13315b59a487f7e8d0c4b15c
2e4e1043) against the source code bundled with web2py; the fpdf folders appear
to be identical.
Original comment by step.l...@gmail.com
on 29 Oct 2013 at 7:07
PIL is need for jpg and gif support, but this is not your case.
You could use PIL to convert the image to a supported format (maybe a patch
about that could be included in fpdf).
1.7.1 is recent enough
Closing this by now, thanks for reporting it !
Original comment by reingart@gmail.com
on 29 Oct 2013 at 7:14
I encountered this issue just recently when loading certain PNGs under 64-bit
Windows 7. I resolved it by changing the regular expressions to avoid the
'.{3}' syntax, ie:
diff --git a/fpdf/fpdf.py b/fpdf/fpdf.py
index 00bedf8..5c0450a 100644
--- a/fpdf/fpdf.py
+++ b/fpdf/fpdf.py
@@ -1738,8 +1738,8 @@ class FPDF(object):
color += data[pos]
alpha += data[pos]
line = substr(data, pos+1, length)
- color += re.sub('(.{3}).',lambda m: m.group(1),line,
flags=re.DOT
- alpha += re.sub('.{3}(.)',lambda m: m.group(1),line,
flags=re.DOT
+ color += re.sub('(...).',lambda m: m.group(1),line,
flags=re.DOTA
+ alpha += re.sub('...(.)',lambda m: m.group(1),line,
flags=re.DOTA
del data
data = zlib.compress(color)
info['smask'] = zlib.compress(alpha)
Original comment by aren...@aiotec.co.nz
on 31 Oct 2013 at 3:49
@ aren...@aiotec.co.nz, Bingo! I checked your patch with twitter.png on Windows
XP and it works! Thank you.
I don't know how to reopen this issue for Mariano, so I'll open a new issue
pointing here again.
Original comment by step.l...@gmail.com
on 31 Oct 2013 at 4:29
Mmm, after all Mariano hasn't closed this issue yet, so I won't resubmit it. He
should be able to pick aren...@aiotec.co.nz's patch from here.
Original comment by step.l...@gmail.com
on 31 Oct 2013 at 4:33
This issue was closed by revision 557114b43eca.
Original comment by reingart@gmail.com
on 5 Feb 2014 at 4:00
Original issue reported on code.google.com by
step.l...@gmail.com
on 28 Oct 2013 at 12:24