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 JPG, TIFF, lan akeh format dokumen liyane nggunakake Python.
Need kanggo ngowahi JPG gambar kanggo TIFF format programmatically? Kanthi Aspose.Words for Python via .NET pangembang bisa gampang ngowahi JPG menyang TIFF mung sawetara baris Python kode.
Pemrosesan gambar modern Python API nggawe TIFF saka JPG gambar kanthi kacepetan dhuwur. Tes kualitas JPG kanggo TIFF konversi gambar langsung ing browser. Python kuat ngidini ngowahi JPG akeh format grafis populer.
Conto ing ngisor iki nduduhake carane ngowahi JPG dadi TIFF ing Python.
Tindakake langkah-langkah gampang kanggo ngowahi JPG dadi TIFF format Waca JPG gambar saka drive lokal, banjur mung nyimpen minangka TIFF, nemtokake format gambar sing dibutuhake dening TIFF extension. Kanggo loro JPG maca lan TIFF nulis sampeyan bisa nggunakake jeneng berkas kanthi qualified. Konten output TIFF bakal padha karo JPG gambar asli.
pip install aspose-words
Nyalin
import aspose.words as aw
doc = aw.Document()
builder = aw.DocumentBuilder(doc)
shape = builder.insert_image("Input.jpg")
shape.get_shape_renderer().save("Output.tiff", aw.saving.ImageSaveOptions(aw.SaveFormat.TIFF))
import aspose.words as aw
doc = aw.Document("Input.jpg")
doc.save("Output.tiff")
import aspose.words as aw
doc = aw.Document(Input.jpg)
for page in range(0, doc.page_count):
extractedPage = doc.extract_pages(page, 1)
extractedPage.save(f"Output_{page + 1}.tiff")
import aspose.words as aw
doc = aw.Document()
builder = aw.DocumentBuilder(doc)
builder.insert_image("Input.jpg")
doc.save("Output.tiff")
import aspose.words as aw
doc = aw.Document()
builder = aw.DocumentBuilder(doc)
shape = builder.insert_image("Input.jpg")
shape.get_shape_renderer().save("Output.tiff", aw.saving.ImageSaveOptions(aw.SaveFormat.tiff))
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 JPG menyang akeh format file liyane: