Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 303647 Details for
Bug 390607
app-text/pdfshuffler-0.5.1 - NameError: global name 'pixbuf' is not defined
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
more minimal poppler-0.18 compat
pdfshuffler-poppler-0.18.patch (text/plain), 1.78 KB, created by
Marien Zwart (RETIRED)
on 2012-02-28 23:47:36 UTC
(
hide
)
Description:
more minimal poppler-0.18 compat
Filename:
MIME Type:
Creator:
Marien Zwart (RETIRED)
Created:
2012-02-28 23:47:36 UTC
Size:
1.78 KB
patch
obsolete
>Stop using render_to_pixbuf, removed from Poppler 0.18. > >Instead draw to a gdk Pixmap, then get a Pixbuf from that. > >A more complete fix (dropping Pixmap/Pixbuf usage) is in upstream svn, >but that is too large a change for us to take. > >Based on a patch from RafaÅ MużyÅo in gentoo bug #390607. >--- pdfshuffler >+++ pdfshuffler >@@ -982,9 +982,15 @@ > pix_w, pix_h = page.get_size() > pix_w = int(pix_w * self.scale) > pix_h = int(pix_h * self.scale) >- thumbnail = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, False, >- 8, pix_w , pix_h) >- page.render_to_pixbuf(0,0,pix_w,pix_h,self.scale,0,thumbnail) >+ pixmap = gtk.gdk.Pixmap(None, pix_w, pix_h, 24) >+ cr = pixmap.cairo_create() >+ # The pixmap data is not initialized, so paint it white first: >+ cr.set_source_rgb(1, 1, 1) >+ cr.paint() >+ cr.scale(self.scale, self.scale) >+ page.render(cr) >+ thumbnail = gtk.gdk.pixbuf_get_from_drawable( >+ None, pixmap, gtk.gdk.colormap_get_system(), 0, 0, 0, 0, pix_w, pix_h) > rotation = (-rotation) % 360 > rotation = ((rotation + 45) / 90) * 90 > thumbnail = thumbnail.rotate_simple(rotation) >@@ -1003,11 +1009,13 @@ > pix_w = thumbnail.get_width() > pix_h = thumbnail.get_height() > except: >+ import traceback >+ traceback.print_exc() > pix_w = self.default_width > pix_h = pix_w > thumbnail = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, False, > 8, pix_w, pix_h) >- pixbuf.fill(0xffffffff) >+ thumbnail.fill(0xffffffff) > > #add border > thickness = 3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 390607
:
292641
|
292959
|
292961
| 303647