PHP code example of aspose / imaging-sdk-php

1. Go to this page and download the library: Download aspose/imaging-sdk-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

aspose / imaging-sdk-php example snippets


use \Aspose\Imaging\ImagingApi;
use \Aspose\Imaging\Configuration;
use \Aspose\Imaging\Model;
use \Aspose\Imaging\Model\Requests;

	// Get your ClientId and ClientSecret from https://dashboard.aspose.cloud (free registration CLIENT_SECRET");

	$api = new ImagingApi($config);

	$request = new ConvertImageRequest("sample.jpg", "png", "tempFolder", "My_Storage_Name");
	$result = $api->convertImage($request);

$imagingConfig = new Imaging\Configuration();
$imagingConfig->setBaseUrl("yourServiceUrl");
$imagingConfig->setOnPremise(true);
$imagingApi = new Imaging\ImagingApi($imagingConfig);