Gunakake API konversi dokumen kanggo ngembangake piranti lunak independen platform tingkat dhuwur ing Python. Iki minangka solusi piranti lunak profesional lengkap kanggo ngimpor lan ngekspor TIFF, JPG, lan akeh format dokumen liyane nggunakake Python.
Need kanggo ngowahi TIFF gambar kanggo JPG format programmatically? Kanthi Aspose.Words for Python via .NET pangembang bisa gampang ngowahi TIFF menyang JPG mung sawetara baris Python kode.
Pemrosesan gambar modern Python API nggawe JPG saka TIFF gambar kanthi kacepetan dhuwur. Tes kualitas TIFF kanggo JPG konversi gambar langsung ing browser. Python kuat ngidini ngowahi TIFF akeh format grafis populer.
Conto ing ngisor iki nduduhake carane ngowahi TIFF dadi JPG ing Python.
Tindakake langkah-langkah gampang kanggo ngowahi TIFF dadi JPG format Waca TIFF gambar saka drive lokal, banjur mung nyimpen minangka JPG, nemtokake format gambar sing dibutuhake dening JPG extension. Kanggo loro TIFF maca lan JPG nulis sampeyan bisa nggunakake jeneng berkas kanthi qualified. Konten output JPG bakal padha karo TIFF gambar asli.
pip install aspose-words
Nyalin
import aspose.words as aw
doc = aw.Document()
builder = aw.DocumentBuilder(doc)
shape = builder.insert_image("Input.tiff")
shape.get_shape_renderer().save("Output.jpg", aw.saving.ImageSaveOptions(aw.SaveFormat.JPG))
import aspose.words as aw
doc = aw.Document("Input.tiff")
doc.save("Output.jpg")
import aspose.words as aw
doc = aw.Document(Input.tiff)
for page in range(0, doc.page_count):
extractedPage = doc.extract_pages(page, 1)
extractedPage.save(f"Output_{page + 1}.jpg")
import aspose.words as aw
doc = aw.Document()
builder = aw.DocumentBuilder(doc)
builder.insert_image("Input.tiff")
doc.save("Output.jpg")
import aspose.words as aw
doc = aw.Document()
builder = aw.DocumentBuilder(doc)
shape = builder.insert_image("Input.tiff")
shape.get_shape_renderer().save("Output.jpg", aw.saving.ImageSaveOptions(aw.SaveFormat.jpg))
Kita dadi tuan rumah paket Python ing repositori PyPi. Mangga tindakake langkah-langkah dening-instruksi carane nginstal "Aspose.Words for Python via .NET" kanggo lingkungan pangembang.
Paket iki kompatibel karo Python ≥3.5 lan <3.12. Yen sampeyan ngembangake piranti lunak kanggo Linux, deleng syarat tambahan kanggo gcc lan libpython ing Dokumentasi Produk.
Sampeyan bisa ngowahi TIFF menyang akeh format file liyane: