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