Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
5700 Переглядів

Hi,


Does someone already used image_resize_image (tools/image.py) in order print some picture inside some pdf? (Quotation for exemple?).

I am using it and I am not so satisfy about the quality of the picture. The image_resize_image makes my picture blurred.

I would like to know some tips to have better quality.

Thank you a lot,


Selverine

Here my code:

 if base64_source:
		image_stream = io.BytesIO(base64_source.decode(encoding))
    		image = Image.open(image_stream)
		if image.size[0] > image.size[1] :
        		return_dict[shape_name] = image_resize_image_medium(base64_source, size=(160,None),avoid_if_small=avoid_resize_medium)
		else:
        		return_dict[shape_name] = image_resize_image_medium(base64_source, size=(None,160),avoid_if_small=avoid_resize_medium)
Аватар
Відмінити
Автор Найкраща відповідь

So,

I think I will not use this function in order resize my picture before print it in PDF, but I will write directly in rml the dimension that I want.

Good point: Good quality.

Bad point: I need to have a fix size for the picture.


Selverine

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
лип. 25
2038
3
лип. 20
9451
1
трав. 20
3418
0
бер. 20
3439
1
трав. 19
4820