mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-07 04:20:07 +01:00
Explicitly indicate that we don't want an alpha channel when rendering pdf pages
to account from the fact that the default on this parameter differs between mupdf versions
This commit is contained in:
@@ -515,11 +515,8 @@ class mupdfProcessor(object):
|
||||
page = self.pdfdoc.loadPage(pageno)
|
||||
matrix = fitz.Matrix(scale, scale)
|
||||
try:
|
||||
pix = page.getPixmap(matrix=matrix) # MUST be keyword arg(s)
|
||||
if [int(v) for v in fitz.version[1].split('.')] >= [1,15,0]:
|
||||
bmp = wx.Bitmap.FromBuffer(pix.width, pix.height, pix.samples)
|
||||
else:
|
||||
bmp = wx.Bitmap.FromBufferRGBA(pix.width, pix.height, pix.samples)
|
||||
pix = page.getPixmap(matrix=matrix, alpha=False) # MUST be keyword arg(s)
|
||||
bmp = wx.Bitmap.FromBuffer(pix.width, pix.height, pix.samples)
|
||||
gc.DrawBitmap(bmp, 0, 0, pix.width, pix.height)
|
||||
self.zoom_error = False
|
||||
except (RuntimeError, MemoryError):
|
||||
|
||||
Reference in New Issue
Block a user