Extend an image
Extend transformation allows users to extends/pads the edges of the image with the provided background colour. This operation will always occur after resizing and extraction, if any. It is generally recommended to start with a high-quality image with a high resolution to avoid loss of image quality when extending the image.
Params
Top (t
), Left (l
), Bottom (b
), Right (r
)
The range for the top
, right
, bottom
, and left
parameters is from 0
to 500
, with 10
as the default value. The default background
color applied is black
.
- Original Image
- Default extend
- top=60, bottom=60
- top=20, right=40, bottom=20, left=40
- URL
- React
- JavaScript
- Node.js
- Python
- Golang
- Kotlin
- C#
- PHP
<PixelBinImage
url="https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/original/images/transformation/basic_chair.jpeg"
/>
import Pixelbin from "@pixelbin/core";
const obj = {
cloudName: "dummy-cloudname",
zone: "FIDrmb",
version: "v2",
transformations: [],
filePath: "images/transformation/basic_chair.jpeg",
baseUrl: "https://cdn.pixelbin.io",
};
const url = Pixelbin.default.utils.objToUrl(obj);
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/original/images/transformation/basic_chair.jpeg
const Pixelbin = require("@pixelbin/admin");
const obj = {
cloudName: "dummy-cloudname",
zone: "FIDrmb",
version: "v2",
transformations: [],
filePath: "images/transformation/basic_chair.jpeg",
baseUrl: "https://cdn.pixelbin.io",
};
const url = Pixelbin.url.objToUrl(obj);
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/original/images/transformation/basic_chair.jpeg
from pixelbin.utils.url import obj_to_url
obj = {
"cloudName": "dummy-cloudname",
"zone": "FIDrmb",
"version": "v2",
"transformations": [],
"filePath": "images/transformation/basic_chair.jpeg",
"baseUrl": "https://cdn.pixelbin.io",
}
url = obj_to_url(obj)
# url
# https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/original/images/transformation/basic_chair.jpeg
package main
import (
"fmt"
"github.com/pixelbin-dev/pixelbin-go/v2/sdk/utils/url"
)
func main() {
obj := map[string]interface{}{
"cloudName": "dummy-cloudname",
"zoneSlug": "FIDrmb",
"version": "v2",
"transformations": []map[string]interface{}{
},
"filePath": "images/transformation/basic_chair.jpeg",
"baseUrl": "https://cdn.pixelbin.io",
"options": map[string]interface{}{},
}
urlstring, err := url.ObjToUrl(obj)
if err != nil {
fmt.Println(err)
}
}
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/original/images/transformation/basic_chair.jpeg
import com.pixelbin.url.UrlObj
import com.pixelbin.Utils
import com.pixelbin.transformation.TransformationObj
fun main(){
val obj = UrlObj(
cloudName = "dummy-cloudname",
zone = "FIDrmb",
version = "v2",
transformation = arrayListOf(
),
filePath = "images/transformation/basic_chair.jpeg",
baseUrl = "https://cdn.pixelbin.io"
)
val url = Utils.objToUrl(obj)
}
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/original/images/transformation/basic_chair.jpeg
using System;
using System.Collections.Generic;
using System.IO;
using Pixelbin.Utils;
namespace ExampleNamespace
{
class ExampleClass
{
static void Main(string[] args)
{
UrlObj obj = new UrlObj(
version: "v2",
cloudName: "dummy-cloudname",
filePath: "images/transformation/basic_chair.jpeg",
zone: "FIDrmb",
baseUrl: "https://cdn.pixelbin.io",
transformations: new List<UrlTransformation>() {
}
);
string url = Url.ObjToUrl(obj);
}
}
}
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/original/images/transformation/basic_chair.jpeg
<?php
require 'vendor/autoload.php';
use Pixelbin\Utils\Url;
$obj = [
"cloudName" => "dummy-cloudname",
"zone" => "FIDrmb",
"version" => "v2",
"options" => [],
"transformations" => [
],
"filePath" => "images/transformation/basic_chair.jpeg",
"baseUrl" => "https://cdn.pixelbin.io",
];
$url = Url::obj_to_url($obj);
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/original/images/transformation/basic_chair.jpeg
?>
- URL
- React
- JavaScript
- Node.js
- Python
- Golang
- Kotlin
- C#
- PHP
<PixelBinImage
url="https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend()/images/transformation/basic_chair.jpeg"
/>
import Pixelbin from "@pixelbin/core";
const obj = {
cloudName: "dummy-cloudname",
zone: "FIDrmb",
version: "v2",
transformations: [{"name":"resize","plugin":"t","values":[{"key":"h","value":"300"},{"key":"w","value":"200"}]},{"name":"extend","plugin":"t"}],
filePath: "images/transformation/basic_chair.jpeg",
baseUrl: "https://cdn.pixelbin.io",
};
const url = Pixelbin.default.utils.objToUrl(obj);
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend()/images/transformation/basic_chair.jpeg
const Pixelbin = require("@pixelbin/admin");
const obj = {
cloudName: "dummy-cloudname",
zone: "FIDrmb",
version: "v2",
transformations: [{"name":"resize","plugin":"t","values":[{"key":"h","value":"300"},{"key":"w","value":"200"}]},{"name":"extend","plugin":"t"}],
filePath: "images/transformation/basic_chair.jpeg",
baseUrl: "https://cdn.pixelbin.io",
};
const url = Pixelbin.url.objToUrl(obj);
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend()/images/transformation/basic_chair.jpeg
from pixelbin.utils.url import obj_to_url
obj = {
"cloudName": "dummy-cloudname",
"zone": "FIDrmb",
"version": "v2",
"transformations": [{"name":"resize","plugin":"t","values":[{"key":"h","value":"300"},{"key":"w","value":"200"}]},{"name":"extend","plugin":"t"}],
"filePath": "images/transformation/basic_chair.jpeg",
"baseUrl": "https://cdn.pixelbin.io",
}
url = obj_to_url(obj)
# url
# https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend()/images/transformation/basic_chair.jpeg
package main
import (
"fmt"
"github.com/pixelbin-dev/pixelbin-go/v2/sdk/utils/url"
)
func main() {
obj := map[string]interface{}{
"cloudName": "dummy-cloudname",
"zoneSlug": "FIDrmb",
"version": "v2",
"transformations": []map[string]interface{}{
{"plugin": "t", "name": "resize", "values": []map[string]interface{}{ {"key": "h", "value": "300"},{"key": "w", "value": "200"},}},,
{"plugin": "t", "name": "extend"},
},
"filePath": "images/transformation/basic_chair.jpeg",
"baseUrl": "https://cdn.pixelbin.io",
"options": map[string]interface{}{},
}
urlstring, err := url.ObjToUrl(obj)
if err != nil {
fmt.Println(err)
}
}
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend()/images/transformation/basic_chair.jpeg
import com.pixelbin.url.UrlObj
import com.pixelbin.Utils
import com.pixelbin.transformation.TransformationObj
fun main(){
val obj = UrlObj(
cloudName = "dummy-cloudname",
zone = "FIDrmb",
version = "v2",
transformation = arrayListOf(
TransformationObj( plugin = "t", name = "resize", values = hashMapOf( "h" to "300","w" to "200"), ),
TransformationObj( plugin = "t", name = "extend", )
),
filePath = "images/transformation/basic_chair.jpeg",
baseUrl = "https://cdn.pixelbin.io"
)
val url = Utils.objToUrl(obj)
}
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend()/images/transformation/basic_chair.jpeg
using System;
using System.Collections.Generic;
using System.IO;
using Pixelbin.Utils;
namespace ExampleNamespace
{
class ExampleClass
{
static void Main(string[] args)
{
UrlObj obj = new UrlObj(
version: "v2",
cloudName: "dummy-cloudname",
filePath: "images/transformation/basic_chair.jpeg",
zone: "FIDrmb",
baseUrl: "https://cdn.pixelbin.io",
transformations: new List<UrlTransformation>() {
new UrlTransformation(plugin: "t", name: "resize", values: new List<Dictionary<string, string>>() { new Dictionary<string, string>() { { "key", "h" }, { "value", "300" } }, new Dictionary<string, string>() { { "key", "w" }, { "value", "200" } }} ),
new UrlTransformation(plugin: "t", name: "extend", )
}
);
string url = Url.ObjToUrl(obj);
}
}
}
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend()/images/transformation/basic_chair.jpeg
<?php
require 'vendor/autoload.php';
use Pixelbin\Utils\Url;
$obj = [
"cloudName" => "dummy-cloudname",
"zone" => "FIDrmb",
"version" => "v2",
"options" => [],
"transformations" => [
["plugin" => "t", "name" => "resize", "values" => [ [ "key" => "h", "value" => "300" ], [ "key" => "w", "value" => "200" ], ], ],
["plugin" => "t", "name" => "extend", ],
],
"filePath" => "images/transformation/basic_chair.jpeg",
"baseUrl" => "https://cdn.pixelbin.io",
];
$url = Url::obj_to_url($obj);
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend()/images/transformation/basic_chair.jpeg
?>
- URL
- React
- JavaScript
- Node.js
- Python
- Golang
- Kotlin
- C#
- PHP
<PixelBinImage
url="https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:60,b:60)/images/transformation/basic_chair.jpeg"
/>
import Pixelbin from "@pixelbin/core";
const obj = {
cloudName: "dummy-cloudname",
zone: "FIDrmb",
version: "v2",
transformations: [{"name":"resize","plugin":"t","values":[{"key":"h","value":"300"},{"key":"w","value":"200"}]},{"name":"extend","plugin":"t","values":[{"key":"t","value":"60"},{"key":"b","value":"60"}]}],
filePath: "images/transformation/basic_chair.jpeg",
baseUrl: "https://cdn.pixelbin.io",
};
const url = Pixelbin.default.utils.objToUrl(obj);
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:60,b:60)/images/transformation/basic_chair.jpeg
const Pixelbin = require("@pixelbin/admin");
const obj = {
cloudName: "dummy-cloudname",
zone: "FIDrmb",
version: "v2",
transformations: [{"name":"resize","plugin":"t","values":[{"key":"h","value":"300"},{"key":"w","value":"200"}]},{"name":"extend","plugin":"t","values":[{"key":"t","value":"60"},{"key":"b","value":"60"}]}],
filePath: "images/transformation/basic_chair.jpeg",
baseUrl: "https://cdn.pixelbin.io",
};
const url = Pixelbin.url.objToUrl(obj);
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:60,b:60)/images/transformation/basic_chair.jpeg
from pixelbin.utils.url import obj_to_url
obj = {
"cloudName": "dummy-cloudname",
"zone": "FIDrmb",
"version": "v2",
"transformations": [{"name":"resize","plugin":"t","values":[{"key":"h","value":"300"},{"key":"w","value":"200"}]},{"name":"extend","plugin":"t","values":[{"key":"t","value":"60"},{"key":"b","value":"60"}]}],
"filePath": "images/transformation/basic_chair.jpeg",
"baseUrl": "https://cdn.pixelbin.io",
}
url = obj_to_url(obj)
# url
# https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:60,b:60)/images/transformation/basic_chair.jpeg
package main
import (
"fmt"
"github.com/pixelbin-dev/pixelbin-go/v2/sdk/utils/url"
)
func main() {
obj := map[string]interface{}{
"cloudName": "dummy-cloudname",
"zoneSlug": "FIDrmb",
"version": "v2",
"transformations": []map[string]interface{}{
{"plugin": "t", "name": "resize", "values": []map[string]interface{}{ {"key": "h", "value": "300"},{"key": "w", "value": "200"},}},,
{"plugin": "t", "name": "extend", "values": []map[string]interface{}{ {"key": "t", "value": "60"},{"key": "b", "value": "60"},}},
},
"filePath": "images/transformation/basic_chair.jpeg",
"baseUrl": "https://cdn.pixelbin.io",
"options": map[string]interface{}{},
}
urlstring, err := url.ObjToUrl(obj)
if err != nil {
fmt.Println(err)
}
}
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:60,b:60)/images/transformation/basic_chair.jpeg
import com.pixelbin.url.UrlObj
import com.pixelbin.Utils
import com.pixelbin.transformation.TransformationObj
fun main(){
val obj = UrlObj(
cloudName = "dummy-cloudname",
zone = "FIDrmb",
version = "v2",
transformation = arrayListOf(
TransformationObj( plugin = "t", name = "resize", values = hashMapOf( "h" to "300","w" to "200"), ),
TransformationObj( plugin = "t", name = "extend", values = hashMapOf( "t" to "60","b" to "60"), )
),
filePath = "images/transformation/basic_chair.jpeg",
baseUrl = "https://cdn.pixelbin.io"
)
val url = Utils.objToUrl(obj)
}
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:60,b:60)/images/transformation/basic_chair.jpeg
using System;
using System.Collections.Generic;
using System.IO;
using Pixelbin.Utils;
namespace ExampleNamespace
{
class ExampleClass
{
static void Main(string[] args)
{
UrlObj obj = new UrlObj(
version: "v2",
cloudName: "dummy-cloudname",
filePath: "images/transformation/basic_chair.jpeg",
zone: "FIDrmb",
baseUrl: "https://cdn.pixelbin.io",
transformations: new List<UrlTransformation>() {
new UrlTransformation(plugin: "t", name: "resize", values: new List<Dictionary<string, string>>() { new Dictionary<string, string>() { { "key", "h" }, { "value", "300" } }, new Dictionary<string, string>() { { "key", "w" }, { "value", "200" } }} ),
new UrlTransformation(plugin: "t", name: "extend", values: new List<Dictionary<string, string>>() { new Dictionary<string, string>() { { "key", "t" }, { "value", "60" } }, new Dictionary<string, string>() { { "key", "b" }, { "value", "60" } }} )
}
);
string url = Url.ObjToUrl(obj);
}
}
}
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:60,b:60)/images/transformation/basic_chair.jpeg
<?php
require 'vendor/autoload.php';
use Pixelbin\Utils\Url;
$obj = [
"cloudName" => "dummy-cloudname",
"zone" => "FIDrmb",
"version" => "v2",
"options" => [],
"transformations" => [
["plugin" => "t", "name" => "resize", "values" => [ [ "key" => "h", "value" => "300" ], [ "key" => "w", "value" => "200" ], ], ],
["plugin" => "t", "name" => "extend", "values" => [ [ "key" => "t", "value" => "60" ], [ "key" => "b", "value" => "60" ], ], ],
],
"filePath" => "images/transformation/basic_chair.jpeg",
"baseUrl" => "https://cdn.pixelbin.io",
];
$url = Url::obj_to_url($obj);
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:60,b:60)/images/transformation/basic_chair.jpeg
?>
- URL
- React
- JavaScript
- Node.js
- Python
- Golang
- Kotlin
- C#
- PHP
<PixelBinImage
url="https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:20,r:40,b:20,l:40)/images/transformation/basic_chair.jpeg"
/>
import Pixelbin from "@pixelbin/core";
const obj = {
cloudName: "dummy-cloudname",
zone: "FIDrmb",
version: "v2",
transformations: [{"name":"resize","plugin":"t","values":[{"key":"h","value":"300"},{"key":"w","value":"200"}]},{"name":"extend","plugin":"t","values":[{"key":"t","value":"20"},{"key":"r","value":"40"},{"key":"b","value":"20"},{"key":"l","value":"40"}]}],
filePath: "images/transformation/basic_chair.jpeg",
baseUrl: "https://cdn.pixelbin.io",
};
const url = Pixelbin.default.utils.objToUrl(obj);
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:20,r:40,b:20,l:40)/images/transformation/basic_chair.jpeg
const Pixelbin = require("@pixelbin/admin");
const obj = {
cloudName: "dummy-cloudname",
zone: "FIDrmb",
version: "v2",
transformations: [{"name":"resize","plugin":"t","values":[{"key":"h","value":"300"},{"key":"w","value":"200"}]},{"name":"extend","plugin":"t","values":[{"key":"t","value":"20"},{"key":"r","value":"40"},{"key":"b","value":"20"},{"key":"l","value":"40"}]}],
filePath: "images/transformation/basic_chair.jpeg",
baseUrl: "https://cdn.pixelbin.io",
};
const url = Pixelbin.url.objToUrl(obj);
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:20,r:40,b:20,l:40)/images/transformation/basic_chair.jpeg
from pixelbin.utils.url import obj_to_url
obj = {
"cloudName": "dummy-cloudname",
"zone": "FIDrmb",
"version": "v2",
"transformations": [{"name":"resize","plugin":"t","values":[{"key":"h","value":"300"},{"key":"w","value":"200"}]},{"name":"extend","plugin":"t","values":[{"key":"t","value":"20"},{"key":"r","value":"40"},{"key":"b","value":"20"},{"key":"l","value":"40"}]}],
"filePath": "images/transformation/basic_chair.jpeg",
"baseUrl": "https://cdn.pixelbin.io",
}
url = obj_to_url(obj)
# url
# https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:20,r:40,b:20,l:40)/images/transformation/basic_chair.jpeg
package main
import (
"fmt"
"github.com/pixelbin-dev/pixelbin-go/v2/sdk/utils/url"
)
func main() {
obj := map[string]interface{}{
"cloudName": "dummy-cloudname",
"zoneSlug": "FIDrmb",
"version": "v2",
"transformations": []map[string]interface{}{
{"plugin": "t", "name": "resize", "values": []map[string]interface{}{ {"key": "h", "value": "300"},{"key": "w", "value": "200"},}},,
{"plugin": "t", "name": "extend", "values": []map[string]interface{}{ {"key": "t", "value": "20"},{"key": "r", "value": "40"},{"key": "b", "value": "20"},{"key": "l", "value": "40"},}},
},
"filePath": "images/transformation/basic_chair.jpeg",
"baseUrl": "https://cdn.pixelbin.io",
"options": map[string]interface{}{},
}
urlstring, err := url.ObjToUrl(obj)
if err != nil {
fmt.Println(err)
}
}
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:20,r:40,b:20,l:40)/images/transformation/basic_chair.jpeg
import com.pixelbin.url.UrlObj
import com.pixelbin.Utils
import com.pixelbin.transformation.TransformationObj
fun main(){
val obj = UrlObj(
cloudName = "dummy-cloudname",
zone = "FIDrmb",
version = "v2",
transformation = arrayListOf(
TransformationObj( plugin = "t", name = "resize", values = hashMapOf( "h" to "300","w" to "200"), ),
TransformationObj( plugin = "t", name = "extend", values = hashMapOf( "t" to "20","r" to "40","b" to "20","l" to "40"), )
),
filePath = "images/transformation/basic_chair.jpeg",
baseUrl = "https://cdn.pixelbin.io"
)
val url = Utils.objToUrl(obj)
}
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:20,r:40,b:20,l:40)/images/transformation/basic_chair.jpeg
using System;
using System.Collections.Generic;
using System.IO;
using Pixelbin.Utils;
namespace ExampleNamespace
{
class ExampleClass
{
static void Main(string[] args)
{
UrlObj obj = new UrlObj(
version: "v2",
cloudName: "dummy-cloudname",
filePath: "images/transformation/basic_chair.jpeg",
zone: "FIDrmb",
baseUrl: "https://cdn.pixelbin.io",
transformations: new List<UrlTransformation>() {
new UrlTransformation(plugin: "t", name: "resize", values: new List<Dictionary<string, string>>() { new Dictionary<string, string>() { { "key", "h" }, { "value", "300" } }, new Dictionary<string, string>() { { "key", "w" }, { "value", "200" } }} ),
new UrlTransformation(plugin: "t", name: "extend", values: new List<Dictionary<string, string>>() { new Dictionary<string, string>() { { "key", "t" }, { "value", "20" } }, new Dictionary<string, string>() { { "key", "r" }, { "value", "40" } }, new Dictionary<string, string>() { { "key", "b" }, { "value", "20" } }, new Dictionary<string, string>() { { "key", "l" }, { "value", "40" } }} )
}
);
string url = Url.ObjToUrl(obj);
}
}
}
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:20,r:40,b:20,l:40)/images/transformation/basic_chair.jpeg
<?php
require 'vendor/autoload.php';
use Pixelbin\Utils\Url;
$obj = [
"cloudName" => "dummy-cloudname",
"zone" => "FIDrmb",
"version" => "v2",
"options" => [],
"transformations" => [
["plugin" => "t", "name" => "resize", "values" => [ [ "key" => "h", "value" => "300" ], [ "key" => "w", "value" => "200" ], ], ],
["plugin" => "t", "name" => "extend", "values" => [ [ "key" => "t", "value" => "20" ], [ "key" => "r", "value" => "40" ], [ "key" => "b", "value" => "20" ], [ "key" => "l", "value" => "40" ], ], ],
],
"filePath" => "images/transformation/basic_chair.jpeg",
"baseUrl" => "https://cdn.pixelbin.io",
];
$url = Url::obj_to_url($obj);
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:20,r:40,b:20,l:40)/images/transformation/basic_chair.jpeg
?>
Background (bc
)
The background colour for the padded area.
Uses hex value to determine the background color. The default background color is black
.
- Default extend with background=black
- background=daa520
- Original
- URL
- React
- JavaScript
- Node.js
- Python
- Golang
- Kotlin
- C#
- PHP
<PixelBinImage
url="https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend()/images/transformation/basic_chair.jpeg"
/>
import Pixelbin from "@pixelbin/core";
const obj = {
cloudName: "dummy-cloudname",
zone: "FIDrmb",
version: "v2",
transformations: [{"name":"resize","plugin":"t","values":[{"key":"h","value":"300"},{"key":"w","value":"200"}]},{"name":"extend","plugin":"t"}],
filePath: "images/transformation/basic_chair.jpeg",
baseUrl: "https://cdn.pixelbin.io",
};
const url = Pixelbin.default.utils.objToUrl(obj);
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend()/images/transformation/basic_chair.jpeg
const Pixelbin = require("@pixelbin/admin");
const obj = {
cloudName: "dummy-cloudname",
zone: "FIDrmb",
version: "v2",
transformations: [{"name":"resize","plugin":"t","values":[{"key":"h","value":"300"},{"key":"w","value":"200"}]},{"name":"extend","plugin":"t"}],
filePath: "images/transformation/basic_chair.jpeg",
baseUrl: "https://cdn.pixelbin.io",
};
const url = Pixelbin.url.objToUrl(obj);
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend()/images/transformation/basic_chair.jpeg
from pixelbin.utils.url import obj_to_url
obj = {
"cloudName": "dummy-cloudname",
"zone": "FIDrmb",
"version": "v2",
"transformations": [{"name":"resize","plugin":"t","values":[{"key":"h","value":"300"},{"key":"w","value":"200"}]},{"name":"extend","plugin":"t"}],
"filePath": "images/transformation/basic_chair.jpeg",
"baseUrl": "https://cdn.pixelbin.io",
}
url = obj_to_url(obj)
# url
# https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend()/images/transformation/basic_chair.jpeg
package main
import (
"fmt"
"github.com/pixelbin-dev/pixelbin-go/v2/sdk/utils/url"
)
func main() {
obj := map[string]interface{}{
"cloudName": "dummy-cloudname",
"zoneSlug": "FIDrmb",
"version": "v2",
"transformations": []map[string]interface{}{
{"plugin": "t", "name": "resize", "values": []map[string]interface{}{ {"key": "h", "value": "300"},{"key": "w", "value": "200"},}},,
{"plugin": "t", "name": "extend"},
},
"filePath": "images/transformation/basic_chair.jpeg",
"baseUrl": "https://cdn.pixelbin.io",
"options": map[string]interface{}{},
}
urlstring, err := url.ObjToUrl(obj)
if err != nil {
fmt.Println(err)
}
}
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend()/images/transformation/basic_chair.jpeg
import com.pixelbin.url.UrlObj
import com.pixelbin.Utils
import com.pixelbin.transformation.TransformationObj
fun main(){
val obj = UrlObj(
cloudName = "dummy-cloudname",
zone = "FIDrmb",
version = "v2",
transformation = arrayListOf(
TransformationObj( plugin = "t", name = "resize", values = hashMapOf( "h" to "300","w" to "200"), ),
TransformationObj( plugin = "t", name = "extend", )
),
filePath = "images/transformation/basic_chair.jpeg",
baseUrl = "https://cdn.pixelbin.io"
)
val url = Utils.objToUrl(obj)
}
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend()/images/transformation/basic_chair.jpeg
using System;
using System.Collections.Generic;
using System.IO;
using Pixelbin.Utils;
namespace ExampleNamespace
{
class ExampleClass
{
static void Main(string[] args)
{
UrlObj obj = new UrlObj(
version: "v2",
cloudName: "dummy-cloudname",
filePath: "images/transformation/basic_chair.jpeg",
zone: "FIDrmb",
baseUrl: "https://cdn.pixelbin.io",
transformations: new List<UrlTransformation>() {
new UrlTransformation(plugin: "t", name: "resize", values: new List<Dictionary<string, string>>() { new Dictionary<string, string>() { { "key", "h" }, { "value", "300" } }, new Dictionary<string, string>() { { "key", "w" }, { "value", "200" } }} ),
new UrlTransformation(plugin: "t", name: "extend", )
}
);
string url = Url.ObjToUrl(obj);
}
}
}
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend()/images/transformation/basic_chair.jpeg
<?php
require 'vendor/autoload.php';
use Pixelbin\Utils\Url;
$obj = [
"cloudName" => "dummy-cloudname",
"zone" => "FIDrmb",
"version" => "v2",
"options" => [],
"transformations" => [
["plugin" => "t", "name" => "resize", "values" => [ [ "key" => "h", "value" => "300" ], [ "key" => "w", "value" => "200" ], ], ],
["plugin" => "t", "name" => "extend", ],
],
"filePath" => "images/transformation/basic_chair.jpeg",
"baseUrl" => "https://cdn.pixelbin.io",
];
$url = Url::obj_to_url($obj);
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend()/images/transformation/basic_chair.jpeg
?>
- URL
- React
- JavaScript
- Node.js
- Python
- Golang
- Kotlin
- C#
- PHP
<PixelBinImage
url="https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(bc:daa520)/images/transformation/basic_chair.jpeg"
/>
import Pixelbin from "@pixelbin/core";
const obj = {
cloudName: "dummy-cloudname",
zone: "FIDrmb",
version: "v2",
transformations: [{"name":"resize","plugin":"t","values":[{"key":"h","value":"300"},{"key":"w","value":"200"}]},{"name":"extend","plugin":"t","values":[{"key":"bc","value":"daa520"}]}],
filePath: "images/transformation/basic_chair.jpeg",
baseUrl: "https://cdn.pixelbin.io",
};
const url = Pixelbin.default.utils.objToUrl(obj);
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(bc:daa520)/images/transformation/basic_chair.jpeg
const Pixelbin = require("@pixelbin/admin");
const obj = {
cloudName: "dummy-cloudname",
zone: "FIDrmb",
version: "v2",
transformations: [{"name":"resize","plugin":"t","values":[{"key":"h","value":"300"},{"key":"w","value":"200"}]},{"name":"extend","plugin":"t","values":[{"key":"bc","value":"daa520"}]}],
filePath: "images/transformation/basic_chair.jpeg",
baseUrl: "https://cdn.pixelbin.io",
};
const url = Pixelbin.url.objToUrl(obj);
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(bc:daa520)/images/transformation/basic_chair.jpeg
from pixelbin.utils.url import obj_to_url
obj = {
"cloudName": "dummy-cloudname",
"zone": "FIDrmb",
"version": "v2",
"transformations": [{"name":"resize","plugin":"t","values":[{"key":"h","value":"300"},{"key":"w","value":"200"}]},{"name":"extend","plugin":"t","values":[{"key":"bc","value":"daa520"}]}],
"filePath": "images/transformation/basic_chair.jpeg",
"baseUrl": "https://cdn.pixelbin.io",
}
url = obj_to_url(obj)
# url
# https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(bc:daa520)/images/transformation/basic_chair.jpeg
package main
import (
"fmt"
"github.com/pixelbin-dev/pixelbin-go/v2/sdk/utils/url"
)
func main() {
obj := map[string]interface{}{
"cloudName": "dummy-cloudname",
"zoneSlug": "FIDrmb",
"version": "v2",
"transformations": []map[string]interface{}{
{"plugin": "t", "name": "resize", "values": []map[string]interface{}{ {"key": "h", "value": "300"},{"key": "w", "value": "200"},}},,
{"plugin": "t", "name": "extend", "values": []map[string]interface{}{ {"key": "bc", "value": "daa520"},}},
},
"filePath": "images/transformation/basic_chair.jpeg",
"baseUrl": "https://cdn.pixelbin.io",
"options": map[string]interface{}{},
}
urlstring, err := url.ObjToUrl(obj)
if err != nil {
fmt.Println(err)
}
}
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(bc:daa520)/images/transformation/basic_chair.jpeg
import com.pixelbin.url.UrlObj
import com.pixelbin.Utils
import com.pixelbin.transformation.TransformationObj
fun main(){
val obj = UrlObj(
cloudName = "dummy-cloudname",
zone = "FIDrmb",
version = "v2",
transformation = arrayListOf(
TransformationObj( plugin = "t", name = "resize", values = hashMapOf( "h" to "300","w" to "200"), ),
TransformationObj( plugin = "t", name = "extend", values = hashMapOf( "bc" to "daa520"), )
),
filePath = "images/transformation/basic_chair.jpeg",
baseUrl = "https://cdn.pixelbin.io"
)
val url = Utils.objToUrl(obj)
}
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(bc:daa520)/images/transformation/basic_chair.jpeg
using System;
using System.Collections.Generic;
using System.IO;
using Pixelbin.Utils;
namespace ExampleNamespace
{
class ExampleClass
{
static void Main(string[] args)
{
UrlObj obj = new UrlObj(
version: "v2",
cloudName: "dummy-cloudname",
filePath: "images/transformation/basic_chair.jpeg",
zone: "FIDrmb",
baseUrl: "https://cdn.pixelbin.io",
transformations: new List<UrlTransformation>() {
new UrlTransformation(plugin: "t", name: "resize", values: new List<Dictionary<string, string>>() { new Dictionary<string, string>() { { "key", "h" }, { "value", "300" } }, new Dictionary<string, string>() { { "key", "w" }, { "value", "200" } }} ),
new UrlTransformation(plugin: "t", name: "extend", values: new List<Dictionary<string, string>>() { new Dictionary<string, string>() { { "key", "bc" }, { "value", "daa520" } }} )
}
);
string url = Url.ObjToUrl(obj);
}
}
}
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(bc:daa520)/images/transformation/basic_chair.jpeg
<?php
require 'vendor/autoload.php';
use Pixelbin\Utils\Url;
$obj = [
"cloudName" => "dummy-cloudname",
"zone" => "FIDrmb",
"version" => "v2",
"options" => [],
"transformations" => [
["plugin" => "t", "name" => "resize", "values" => [ [ "key" => "h", "value" => "300" ], [ "key" => "w", "value" => "200" ], ], ],
["plugin" => "t", "name" => "extend", "values" => [ [ "key" => "bc", "value" => "daa520" ], ], ],
],
"filePath" => "images/transformation/basic_chair.jpeg",
"baseUrl" => "https://cdn.pixelbin.io",
];
$url = Url::obj_to_url($obj);
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(bc:daa520)/images/transformation/basic_chair.jpeg
?>
- URL
- React
- JavaScript
- Node.js
- Python
- Golang
- Kotlin
- C#
- PHP
<PixelBinImage
url="https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/original/images/transformation/basic_chair.jpeg"
/>
import Pixelbin from "@pixelbin/core";
const obj = {
cloudName: "dummy-cloudname",
zone: "FIDrmb",
version: "v2",
transformations: [],
filePath: "images/transformation/basic_chair.jpeg",
baseUrl: "https://cdn.pixelbin.io",
};
const url = Pixelbin.default.utils.objToUrl(obj);
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/original/images/transformation/basic_chair.jpeg
const Pixelbin = require("@pixelbin/admin");
const obj = {
cloudName: "dummy-cloudname",
zone: "FIDrmb",
version: "v2",
transformations: [],
filePath: "images/transformation/basic_chair.jpeg",
baseUrl: "https://cdn.pixelbin.io",
};
const url = Pixelbin.url.objToUrl(obj);
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/original/images/transformation/basic_chair.jpeg
from pixelbin.utils.url import obj_to_url
obj = {
"cloudName": "dummy-cloudname",
"zone": "FIDrmb",
"version": "v2",
"transformations": [],
"filePath": "images/transformation/basic_chair.jpeg",
"baseUrl": "https://cdn.pixelbin.io",
}
url = obj_to_url(obj)
# url
# https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/original/images/transformation/basic_chair.jpeg
package main
import (
"fmt"
"github.com/pixelbin-dev/pixelbin-go/v2/sdk/utils/url"
)
func main() {
obj := map[string]interface{}{
"cloudName": "dummy-cloudname",
"zoneSlug": "FIDrmb",
"version": "v2",
"transformations": []map[string]interface{}{
},
"filePath": "images/transformation/basic_chair.jpeg",
"baseUrl": "https://cdn.pixelbin.io",
"options": map[string]interface{}{},
}
urlstring, err := url.ObjToUrl(obj)
if err != nil {
fmt.Println(err)
}
}
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/original/images/transformation/basic_chair.jpeg
import com.pixelbin.url.UrlObj
import com.pixelbin.Utils
import com.pixelbin.transformation.TransformationObj
fun main(){
val obj = UrlObj(
cloudName = "dummy-cloudname",
zone = "FIDrmb",
version = "v2",
transformation = arrayListOf(
),
filePath = "images/transformation/basic_chair.jpeg",
baseUrl = "https://cdn.pixelbin.io"
)
val url = Utils.objToUrl(obj)
}
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/original/images/transformation/basic_chair.jpeg
using System;
using System.Collections.Generic;
using System.IO;
using Pixelbin.Utils;
namespace ExampleNamespace
{
class ExampleClass
{
static void Main(string[] args)
{
UrlObj obj = new UrlObj(
version: "v2",
cloudName: "dummy-cloudname",
filePath: "images/transformation/basic_chair.jpeg",
zone: "FIDrmb",
baseUrl: "https://cdn.pixelbin.io",
transformations: new List<UrlTransformation>() {
}
);
string url = Url.ObjToUrl(obj);
}
}
}
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/original/images/transformation/basic_chair.jpeg
<?php
require 'vendor/autoload.php';
use Pixelbin\Utils\Url;
$obj = [
"cloudName" => "dummy-cloudname",
"zone" => "FIDrmb",
"version" => "v2",
"options" => [],
"transformations" => [
],
"filePath" => "images/transformation/basic_chair.jpeg",
"baseUrl" => "https://cdn.pixelbin.io",
];
$url = Url::obj_to_url($obj);
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/original/images/transformation/basic_chair.jpeg
?>
Border Type (bt
)
This parameter decides how to fill the extra space created by the pad parameters.
constant (default) - Fills extra space with the solid color specified by the parameter
background
. Ifbackground
is not specified then the access space will be filled with the defaultblack
color.replicate - Fills extra space by replicating the nearest pixels at the border of the original image.
reflect - Fills extra space by reflecting the image from the sides.
wrap - Fills extra space by wrapping the image at the opposite end of the side.
- border-type=constant
- border-type=replicate
- border-type=reflect
- border-type=wrap
- Original
- URL
- React
- JavaScript
- Node.js
- Python
- Golang
- Kotlin
- C#
- PHP
<PixelBinImage
url="https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:30,b:30,r:30,l:30,bt:constant)/images/transformation/basic-default.jpeg"
/>
import Pixelbin from "@pixelbin/core";
const obj = {
cloudName: "dummy-cloudname",
zone: "FIDrmb",
version: "v2",
transformations: [{"name":"resize","plugin":"t","values":[{"key":"h","value":"300"},{"key":"w","value":"200"}]},{"name":"extend","plugin":"t","values":[{"key":"t","value":"30"},{"key":"b","value":"30"},{"key":"r","value":"30"},{"key":"l","value":"30"},{"key":"bt","value":"constant"}]}],
filePath: "images/transformation/basic-default.jpeg",
baseUrl: "https://cdn.pixelbin.io",
};
const url = Pixelbin.default.utils.objToUrl(obj);
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:30,b:30,r:30,l:30,bt:constant)/images/transformation/basic-default.jpeg
const Pixelbin = require("@pixelbin/admin");
const obj = {
cloudName: "dummy-cloudname",
zone: "FIDrmb",
version: "v2",
transformations: [{"name":"resize","plugin":"t","values":[{"key":"h","value":"300"},{"key":"w","value":"200"}]},{"name":"extend","plugin":"t","values":[{"key":"t","value":"30"},{"key":"b","value":"30"},{"key":"r","value":"30"},{"key":"l","value":"30"},{"key":"bt","value":"constant"}]}],
filePath: "images/transformation/basic-default.jpeg",
baseUrl: "https://cdn.pixelbin.io",
};
const url = Pixelbin.url.objToUrl(obj);
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:30,b:30,r:30,l:30,bt:constant)/images/transformation/basic-default.jpeg
from pixelbin.utils.url import obj_to_url
obj = {
"cloudName": "dummy-cloudname",
"zone": "FIDrmb",
"version": "v2",
"transformations": [{"name":"resize","plugin":"t","values":[{"key":"h","value":"300"},{"key":"w","value":"200"}]},{"name":"extend","plugin":"t","values":[{"key":"t","value":"30"},{"key":"b","value":"30"},{"key":"r","value":"30"},{"key":"l","value":"30"},{"key":"bt","value":"constant"}]}],
"filePath": "images/transformation/basic-default.jpeg",
"baseUrl": "https://cdn.pixelbin.io",
}
url = obj_to_url(obj)
# url
# https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:30,b:30,r:30,l:30,bt:constant)/images/transformation/basic-default.jpeg
package main
import (
"fmt"
"github.com/pixelbin-dev/pixelbin-go/v2/sdk/utils/url"
)
func main() {
obj := map[string]interface{}{
"cloudName": "dummy-cloudname",
"zoneSlug": "FIDrmb",
"version": "v2",
"transformations": []map[string]interface{}{
{"plugin": "t", "name": "resize", "values": []map[string]interface{}{ {"key": "h", "value": "300"},{"key": "w", "value": "200"},}},,
{"plugin": "t", "name": "extend", "values": []map[string]interface{}{ {"key": "t", "value": "30"},{"key": "b", "value": "30"},{"key": "r", "value": "30"},{"key": "l", "value": "30"},{"key": "bt", "value": "constant"},}},
},
"filePath": "images/transformation/basic-default.jpeg",
"baseUrl": "https://cdn.pixelbin.io",
"options": map[string]interface{}{},
}
urlstring, err := url.ObjToUrl(obj)
if err != nil {
fmt.Println(err)
}
}
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:30,b:30,r:30,l:30,bt:constant)/images/transformation/basic-default.jpeg
import com.pixelbin.url.UrlObj
import com.pixelbin.Utils
import com.pixelbin.transformation.TransformationObj
fun main(){
val obj = UrlObj(
cloudName = "dummy-cloudname",
zone = "FIDrmb",
version = "v2",
transformation = arrayListOf(
TransformationObj( plugin = "t", name = "resize", values = hashMapOf( "h" to "300","w" to "200"), ),
TransformationObj( plugin = "t", name = "extend", values = hashMapOf( "t" to "30","b" to "30","r" to "30","l" to "30","bt" to "constant"), )
),
filePath = "images/transformation/basic-default.jpeg",
baseUrl = "https://cdn.pixelbin.io"
)
val url = Utils.objToUrl(obj)
}
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:30,b:30,r:30,l:30,bt:constant)/images/transformation/basic-default.jpeg
using System;
using System.Collections.Generic;
using System.IO;
using Pixelbin.Utils;
namespace ExampleNamespace
{
class ExampleClass
{
static void Main(string[] args)
{
UrlObj obj = new UrlObj(
version: "v2",
cloudName: "dummy-cloudname",
filePath: "images/transformation/basic-default.jpeg",
zone: "FIDrmb",
baseUrl: "https://cdn.pixelbin.io",
transformations: new List<UrlTransformation>() {
new UrlTransformation(plugin: "t", name: "resize", values: new List<Dictionary<string, string>>() { new Dictionary<string, string>() { { "key", "h" }, { "value", "300" } }, new Dictionary<string, string>() { { "key", "w" }, { "value", "200" } }} ),
new UrlTransformation(plugin: "t", name: "extend", values: new List<Dictionary<string, string>>() { new Dictionary<string, string>() { { "key", "t" }, { "value", "30" } }, new Dictionary<string, string>() { { "key", "b" }, { "value", "30" } }, new Dictionary<string, string>() { { "key", "r" }, { "value", "30" } }, new Dictionary<string, string>() { { "key", "l" }, { "value", "30" } }, new Dictionary<string, string>() { { "key", "bt" }, { "value", "constant" } }} )
}
);
string url = Url.ObjToUrl(obj);
}
}
}
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:30,b:30,r:30,l:30,bt:constant)/images/transformation/basic-default.jpeg
<?php
require 'vendor/autoload.php';
use Pixelbin\Utils\Url;
$obj = [
"cloudName" => "dummy-cloudname",
"zone" => "FIDrmb",
"version" => "v2",
"options" => [],
"transformations" => [
["plugin" => "t", "name" => "resize", "values" => [ [ "key" => "h", "value" => "300" ], [ "key" => "w", "value" => "200" ], ], ],
["plugin" => "t", "name" => "extend", "values" => [ [ "key" => "t", "value" => "30" ], [ "key" => "b", "value" => "30" ], [ "key" => "r", "value" => "30" ], [ "key" => "l", "value" => "30" ], [ "key" => "bt", "value" => "constant" ], ], ],
],
"filePath" => "images/transformation/basic-default.jpeg",
"baseUrl" => "https://cdn.pixelbin.io",
];
$url = Url::obj_to_url($obj);
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:30,b:30,r:30,l:30,bt:constant)/images/transformation/basic-default.jpeg
?>
- URL
- React
- JavaScript
- Node.js
- Python
- Golang
- Kotlin
- C#
- PHP
<PixelBinImage
url="https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:30,b:30,r:30,l:30,bt:replicate)/images/transformation/basic-default.jpeg"
/>
import Pixelbin from "@pixelbin/core";
const obj = {
cloudName: "dummy-cloudname",
zone: "FIDrmb",
version: "v2",
transformations: [{"name":"resize","plugin":"t","values":[{"key":"h","value":"300"},{"key":"w","value":"200"}]},{"name":"extend","plugin":"t","values":[{"key":"t","value":"30"},{"key":"b","value":"30"},{"key":"r","value":"30"},{"key":"l","value":"30"},{"key":"bt","value":"replicate"}]}],
filePath: "images/transformation/basic-default.jpeg",
baseUrl: "https://cdn.pixelbin.io",
};
const url = Pixelbin.default.utils.objToUrl(obj);
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:30,b:30,r:30,l:30,bt:replicate)/images/transformation/basic-default.jpeg
const Pixelbin = require("@pixelbin/admin");
const obj = {
cloudName: "dummy-cloudname",
zone: "FIDrmb",
version: "v2",
transformations: [{"name":"resize","plugin":"t","values":[{"key":"h","value":"300"},{"key":"w","value":"200"}]},{"name":"extend","plugin":"t","values":[{"key":"t","value":"30"},{"key":"b","value":"30"},{"key":"r","value":"30"},{"key":"l","value":"30"},{"key":"bt","value":"replicate"}]}],
filePath: "images/transformation/basic-default.jpeg",
baseUrl: "https://cdn.pixelbin.io",
};
const url = Pixelbin.url.objToUrl(obj);
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:30,b:30,r:30,l:30,bt:replicate)/images/transformation/basic-default.jpeg
from pixelbin.utils.url import obj_to_url
obj = {
"cloudName": "dummy-cloudname",
"zone": "FIDrmb",
"version": "v2",
"transformations": [{"name":"resize","plugin":"t","values":[{"key":"h","value":"300"},{"key":"w","value":"200"}]},{"name":"extend","plugin":"t","values":[{"key":"t","value":"30"},{"key":"b","value":"30"},{"key":"r","value":"30"},{"key":"l","value":"30"},{"key":"bt","value":"replicate"}]}],
"filePath": "images/transformation/basic-default.jpeg",
"baseUrl": "https://cdn.pixelbin.io",
}
url = obj_to_url(obj)
# url
# https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:30,b:30,r:30,l:30,bt:replicate)/images/transformation/basic-default.jpeg
package main
import (
"fmt"
"github.com/pixelbin-dev/pixelbin-go/v2/sdk/utils/url"
)
func main() {
obj := map[string]interface{}{
"cloudName": "dummy-cloudname",
"zoneSlug": "FIDrmb",
"version": "v2",
"transformations": []map[string]interface{}{
{"plugin": "t", "name": "resize", "values": []map[string]interface{}{ {"key": "h", "value": "300"},{"key": "w", "value": "200"},}},,
{"plugin": "t", "name": "extend", "values": []map[string]interface{}{ {"key": "t", "value": "30"},{"key": "b", "value": "30"},{"key": "r", "value": "30"},{"key": "l", "value": "30"},{"key": "bt", "value": "replicate"},}},
},
"filePath": "images/transformation/basic-default.jpeg",
"baseUrl": "https://cdn.pixelbin.io",
"options": map[string]interface{}{},
}
urlstring, err := url.ObjToUrl(obj)
if err != nil {
fmt.Println(err)
}
}
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:30,b:30,r:30,l:30,bt:replicate)/images/transformation/basic-default.jpeg
import com.pixelbin.url.UrlObj
import com.pixelbin.Utils
import com.pixelbin.transformation.TransformationObj
fun main(){
val obj = UrlObj(
cloudName = "dummy-cloudname",
zone = "FIDrmb",
version = "v2",
transformation = arrayListOf(
TransformationObj( plugin = "t", name = "resize", values = hashMapOf( "h" to "300","w" to "200"), ),
TransformationObj( plugin = "t", name = "extend", values = hashMapOf( "t" to "30","b" to "30","r" to "30","l" to "30","bt" to "replicate"), )
),
filePath = "images/transformation/basic-default.jpeg",
baseUrl = "https://cdn.pixelbin.io"
)
val url = Utils.objToUrl(obj)
}
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:30,b:30,r:30,l:30,bt:replicate)/images/transformation/basic-default.jpeg
using System;
using System.Collections.Generic;
using System.IO;
using Pixelbin.Utils;
namespace ExampleNamespace
{
class ExampleClass
{
static void Main(string[] args)
{
UrlObj obj = new UrlObj(
version: "v2",
cloudName: "dummy-cloudname",
filePath: "images/transformation/basic-default.jpeg",
zone: "FIDrmb",
baseUrl: "https://cdn.pixelbin.io",
transformations: new List<UrlTransformation>() {
new UrlTransformation(plugin: "t", name: "resize", values: new List<Dictionary<string, string>>() { new Dictionary<string, string>() { { "key", "h" }, { "value", "300" } }, new Dictionary<string, string>() { { "key", "w" }, { "value", "200" } }} ),
new UrlTransformation(plugin: "t", name: "extend", values: new List<Dictionary<string, string>>() { new Dictionary<string, string>() { { "key", "t" }, { "value", "30" } }, new Dictionary<string, string>() { { "key", "b" }, { "value", "30" } }, new Dictionary<string, string>() { { "key", "r" }, { "value", "30" } }, new Dictionary<string, string>() { { "key", "l" }, { "value", "30" } }, new Dictionary<string, string>() { { "key", "bt" }, { "value", "replicate" } }} )
}
);
string url = Url.ObjToUrl(obj);
}
}
}
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:30,b:30,r:30,l:30,bt:replicate)/images/transformation/basic-default.jpeg
<?php
require 'vendor/autoload.php';
use Pixelbin\Utils\Url;
$obj = [
"cloudName" => "dummy-cloudname",
"zone" => "FIDrmb",
"version" => "v2",
"options" => [],
"transformations" => [
["plugin" => "t", "name" => "resize", "values" => [ [ "key" => "h", "value" => "300" ], [ "key" => "w", "value" => "200" ], ], ],
["plugin" => "t", "name" => "extend", "values" => [ [ "key" => "t", "value" => "30" ], [ "key" => "b", "value" => "30" ], [ "key" => "r", "value" => "30" ], [ "key" => "l", "value" => "30" ], [ "key" => "bt", "value" => "replicate" ], ], ],
],
"filePath" => "images/transformation/basic-default.jpeg",
"baseUrl" => "https://cdn.pixelbin.io",
];
$url = Url::obj_to_url($obj);
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:30,b:30,r:30,l:30,bt:replicate)/images/transformation/basic-default.jpeg
?>
- URL
- React
- JavaScript
- Node.js
- Python
- Golang
- Kotlin
- C#
- PHP
<PixelBinImage
url="https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:30,b:30,r:30,l:30,bt:reflect)/images/transformation/basic-default.jpeg"
/>
import Pixelbin from "@pixelbin/core";
const obj = {
cloudName: "dummy-cloudname",
zone: "FIDrmb",
version: "v2",
transformations: [{"name":"resize","plugin":"t","values":[{"key":"h","value":"300"},{"key":"w","value":"200"}]},{"name":"extend","plugin":"t","values":[{"key":"t","value":"30"},{"key":"b","value":"30"},{"key":"r","value":"30"},{"key":"l","value":"30"},{"key":"bt","value":"reflect"}]}],
filePath: "images/transformation/basic-default.jpeg",
baseUrl: "https://cdn.pixelbin.io",
};
const url = Pixelbin.default.utils.objToUrl(obj);
// url
// https://cdn.pixelbin.io/v2/dummy-cloudname/FIDrmb/t.resize(h:300,w:200)~t.extend(t:30,b:30,r:30,l:30,bt:reflect)/images/transformation/basic-default.jpeg
const Pixelbin = require("@pixelbin/admin");
const obj = {
cloudName: "dummy-cloudname",
zone: "FIDrmb",
version: "v2",
transformations: [{"name"