mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
c45a2dac8f
commit
0fc654b918
@ -84,7 +84,7 @@ def image_from_x(x):
|
|||||||
|
|
||||||
|
|
||||||
def image_and_format_from_data(data):
|
def image_and_format_from_data(data):
|
||||||
' Create an image object from the specified data which should be a bytsestring and also return the format of the image '
|
' Create an image object from the specified data which should be a bytestring and also return the format of the image '
|
||||||
ba = QByteArray(data)
|
ba = QByteArray(data)
|
||||||
buf = QBuffer(ba)
|
buf = QBuffer(ba)
|
||||||
buf.open(QBuffer.ReadOnly)
|
buf.open(QBuffer.ReadOnly)
|
||||||
@ -548,6 +548,7 @@ def test(): # {{{
|
|||||||
image_to_data(img, fmt='GIF')
|
image_to_data(img, fmt='GIF')
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__': # {{{
|
if __name__ == '__main__': # {{{
|
||||||
args = sys.argv[1:]
|
args = sys.argv[1:]
|
||||||
infile = args.pop(0)
|
infile = args.pop(0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user