Kompres TIFF ing PHP SDK

Ngurangi ukuran TIFF nggunakake PHP

Nggunakake REST API ing PHP, pangembang bisa ngompres TIFF kanthi program. Kanthi solusi sing diwenehake, output bakal dadi file berkualitas tinggi sawise kompresi.

Ndeleng potongan kode

Compress TIFF ing PHP

Nggunakake PHP API sing kuat, pangembang bisa ngompres TIFF kanggo ngoptimalake isi lan ukuran file output. Ngurangi ukuran file dumadi kanthi ngresiki data lan sumber daya sing ora digunakake. Sampeyan uga bisa compress gambar kanggo nggawe ukuran file output malah luwih cilik.

Asil optimasi lan kompresi isi bisa disimpen ing TIFF asli utawa format nyimpen sing kasedhiya - DOCX, DOC, RTF, PDF, HTML lan liya-liyane.

Ngurangi ukuran TIFF file ing PHP

Kaya sing wis kasebut, SDK PHP kita ngidini sampeyan nyuda ukuran TIFF kanthi program. Lan saiki sampeyan bisa nyoba fungsi sing kuat lan ngevaluasi cara ngompres TIFF ing PHP kanthi conto ing ngisor iki:

Unggah file sing pengin dioptimalake / kompres
Kode roto
Pilih format target saka dhaptar
use Aspose\Words\WordsApi;

$wordsApi = new WordsApi('####-####-####-####-####', '##################');

$requestDocument = "Input.tiff";
$requestCompressOptions = new CompressOptions(array(
    "images_quality" => 75,
    "images_reduce_size_factor" => 1,
));
$compressDocumentRequest = new CompressDocumentOnlineRequest(
    $requestDocument, $requestCompressOptions, NULL, NULL, NULL, NULL
);
$compressDocument = $wordsApi->compressDocumentOnline($compressDocumentRequest);

$convertDocument = new ConvertDocumentRequest(
    $compressDocument->document()->values(), "tiff", NULL, NULL, NULL, NULL
);
$wordsApi->convertDocument($convertDocument);
Kode roto
  
Nyalin kode PHP menyang clipboard

Carane ngompres TIFF ing PHP

  1. Pasang Aspose.Words Cloud for PHP
  2. Tambah referensi perpustakaan (ngimpor perpustakaan) menyang proyek PHP sampeyan
  3. Konfigurasi API nggunakake tombol app
  4. Muat sumber TIFF kanggo ngompres
  5. Kompres TIFF, ngresiki informasi sing ora digunakake
  6. Pilih format file output
  7. Entuk asil kompresi TIFF minangka file sing kapisah

Pustaka PHP kanggo nggunakake kompresi TIFF.

Instal 'Aspose.Words Cloud SDK for PHP' saka gudang Packagist. Mung mbukak composer require aspose-cloud/aspose-words-cloud kanggo nginstal SDK, banjur gunakake require_once('vendor/autoload.php'); kanggo ngimpor menyang proyek sampeyan.

Minangka alternatif, sampeyan bisa kanthi manual kloning Aspose.Words Cloud SDK for PHP saka GitHub. Tututi Instructions iki supaya cepet entuk kredensial keamanan sing dibutuhake lan ngakses REST API kita.

Requirements Sistem

PHP 7.1 utawa luwih anyar

Deleng Repository Documentation kanggo ndeleng rincian liyane.

Format file liyane sing didhukung

Sampeyan bisa nindakake kompresi dokumen kanggo format file liyane:

5%

Langganan kanggo Aspose Update Product

Entuk buletin saben wulan lan tawaran langsung dikirim menyang kothak layang.

© Aspose Pty Ltd 2001-2024. Kabeh hak dilindhungi undhang-undhang.