Projet

Général

Profil

0001-misc-get-pdf-image-as-bytes-39289.patch

Frédéric Péters, 27 janvier 2020 14:09

Télécharger (879 octets)

Voir les différences:

Subject: [PATCH] misc: get pdf image as bytes (#39289)

 wcs/qommon/misc.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
wcs/qommon/misc.py
622 622

  
623 623
    if content_type == 'application/pdf':
624 624
        try:
625
            fp = StringIO(subprocess.check_output(
625
            fp = BytesIO(subprocess.check_output(
626 626
                    ['pdftoppm', '-png', '-scale-to-x', '500', '-scale-to-y', '-1', filepath]))
627 627
        except subprocess.CalledProcessError:
628 628
            raise ThumbnailError()
629
-