Gunakake C++ kanggo entuk maksimum HTML nganti GIF kacepetan konversi. Iki minangka solusi piranti lunak profesional lengkap kanggo ngimpor lan ngekspor HTML, GIF, lan akeh format dokumen liyane nggunakake C++.
Kudu ngowahi HTML dadi GIF gambar kanthi program? Kanthi Aspose.Words for C++ pangembang bisa gampang ngowahi HTML menyang GIF format gambar mung sawetara baris C++ kode.
Modern document-processing C++ API nggawe GIF saka HTML kanthi kacepetan dhuwur. Nguji kualitas HTML menyang GIF langsung ing browser. C++ kuat ngidini ngowahi HTML akeh format gambar populer.
Conto ing ngisor iki nduduhake carane ngowahi HTML dadi GIF gambar ing C++.
Tindakake langkah sing gampang kanggo nguripake HTML file menyang GIF format grafis. Waca HTML saka drive lokal, banjur simpen minangka GIF, nemtokake format gambar sing dibutuhake dening extension GIF Kanggo loro HTML maca lan GIF nulis sampeyan bisa nggunakake jeneng berkas kanthi qualified. Konten grafis output GIF bakal padha karo HTML file.
dotnet add package Aspose.Words.Cpp
Nyalin
using namespace Aspose::Words;
auto doc = MakeObject<Document>(u"Input.html");
for (int page = 0; page < doc->get_PageCount(); page++)
{
auto extractedPage = doc->ExtractPages(page, 1);
extractedPage->Save(String::Format(u"Output_{0}.gif", page + 1));
}
using namespace Aspose::Words;
auto doc = MakeObject<Document>(u"Input.html");
doc->Save(u"Output.gif");
using namespace Aspose::Words;
auto doc = MakeObject<Document>(u"Input.html");
for (int page = 0; page < doc->get_PageCount(); page++)
{
auto extractedPage = doc->ExtractPages(page, 1);
extractedPage->Save(String::Format(u"Output_{0}.gif", page + 1));
}
using namespace Aspose::Words;
auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
builder->InsertImage(u"Input.html");
doc->Save(u"Output.gif");
using namespace Aspose::Words;
auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
auto shape = builder->InsertImage(u"Input.html");
shape->GetShapeRenderer()->Save(u"Output.gif", MakeObject<ImageSaveOptions>(SaveFormat::Svg));
Ana telung opsi kanggo nginstal Aspose.Words for C++ kanggo lingkungan pangembang. Pilih salah siji sing cocog karo kabutuhan sampeyan lan tindakake pandhuan langkah demi langkah:
Sampeyan bisa nggunakake perpustakaan C++ iki kanggo nggawe piranti lunak ing Microsoft Windows, Linux lan macOS:
Yen sampeyan nggawe piranti lunak kanggo Linux utawa macOS, priksa informasi babagan katergantungan perpustakaan tambahan (fontconfig lan paket sumber terbuka mesa-glu) ing Dokumentasi Produk.
Sampeyan bisa ngowahi HTML menyang akeh format file liyane: