mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Put the image bytes directly in code
This commit is contained in:
parent
912723e7e2
commit
42318c46b6
Binary file not shown.
Before Width: | Height: | Size: 67 B |
@ -764,7 +764,12 @@ class EditorWidget(QTextEdit, LineEditECM): # {{{
|
||||
with lopen(path, 'rb') as f:
|
||||
data = f.read()
|
||||
except EnvironmentError:
|
||||
return QByteArray(I('blank-1x1.png', data=True))
|
||||
return QByteArray(bytearray.fromhex(
|
||||
'89504e470d0a1a0a0000000d49484452'
|
||||
'000000010000000108060000001f15c4'
|
||||
'890000000a49444154789c6300010000'
|
||||
'0500010d0a2db40000000049454e44ae'
|
||||
'426082'))
|
||||
else:
|
||||
return QByteArray(data)
|
||||
|
||||
|
@ -489,7 +489,12 @@ class HTMLDisplay(QTextBrowser):
|
||||
with lopen(path, 'rb') as f:
|
||||
data = f.read()
|
||||
except EnvironmentError:
|
||||
return QByteArray(I('blank-1x1.png', data=True))
|
||||
return QByteArray(bytearray.fromhex(
|
||||
'89504e470d0a1a0a0000000d49484452'
|
||||
'000000010000000108060000001f15c4'
|
||||
'890000000a49444154789c6300010000'
|
||||
'0500010d0a2db40000000049454e44ae'
|
||||
'426082'))
|
||||
else:
|
||||
return QByteArray(data)
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user