Baixe o app do Guru IA

Android e iOS

Foto de perfil

Sarah

ENVIADA PELO APP
Estudos Gerais04/12/2024

from PIL import Image # Load the image input_path = "/mn...

from PIL import Image

Load the image

input_path = "/mnt/data/A_luxurious_and_dimly_lit_room_with_eight_sophisti.png" output_path = "/mnt/data/Reduced_Size_Ebook_Format.png"

Open the image

original_image = Image.open(input_path)

Define the new size for an e-book-like format (approx 600x800 pixels)

new_size = (600, 800) resized_image = original_image.resize(new_size, Image.ANTIALIAS)

Save the resized image

resized_image.save(output_path)

output_path

Envie suas perguntas pelo App
Google Play
App Store
Equipe Meu Guru

Prefere sua atividade resolvida por um tutor especialista?

  • Receba resolvida até o seu prazo
  • Converse com o tutor pelo chat
  • Garantia de 7 dias contra erros