Asset Get Binary xform
  • 1 Minute to read
  • Dark
    Light

Asset Get Binary xform

  • Dark
    Light

Article summary

To get asset binary xform, mention the following in the postman and then click Send.

GET


Query Parameters

Expand to see the parameters and description


Parameter  Parameter TypeData TypeAccepted ValuesDescription
Asset GUID
RequiredString
GUID
Asset GUID
filetype
OptionalEnumJpg, Tiff, Tif, Png, Gif, Tga, Eps, Ptif, Webp
Determines the file format to be downloaded. Will convert the asset to the file format requested. If blank, will provide the asset in original file format.
size
Optional
Integer>0
Desired download pixel size for longest edge.
width
Optional
Integer
>0Desired download pixel size for width.
height
Optional
Integer>0
Desired download pixel size for height.
maxKbs
Optional
Integer
>0Sets maximum download size in kbs.
transparent
Optional
Booleantrue/false
If original asset has transparency, this can be used to effect transparency.

Specify the required values for params dataOwner and fileName.

Headers

Authorization: Specify required Auth Token in the header.

Call Notes

Here we transform it to a .png:
http://assets.syndigo.com/17d87490-19e5-402f-a246-d466fdaf2b46?filetype=png

And we can size it down (size param applies to the longest side and maintains native aspect ratio):
http://assets.syndigo.com/17d87490-19e5-402f-a246-d466fdaf2b46?filetype=png&size=200

With a maxKbs set to limit file size:
http://assets.syndigo.com/17d87490-19e5-402f-a246-d466fdaf2b46?filetype=png&maxKbs=350

As grayscale:
http://assets.syndigo.com/17d87490-19e5-402f-a246-d466fdaf2b46?palette=grayscale

And more.
Here is the param list from the C# class:

        [FromUri] Guid id,   

        [FromUri] string size = null,  

        [FromUri] AssetConvertTo? fileType = null,   

        [FromUri] int? numRatio = null,  

        [FromUri] int? denRatio = null,   

        [FromUri] bool? crop = null,   

        [FromUri] uint? bColor = null,   

        [FromUri] uint? bFillColor = null,   

        [FromUri] bool originalFileName = false,   

        [FromUri] ColorPalette? palette = null,   

        [FromUri] ushort? ppi = null,  

        [FromUri] byte? bpp = null,  

        [FromUri] ushort? maxMbs = null,   

        [FromUri] int? maxKbs = null,   

        [FromUri] bool thumbnail = false,   

        [FromUri] bool trim = false,   

        [FromUri] ushort? density = null,  

        [FromUri] bool transparent = false,  

        [FromUri] string gravity = null,  

        [FromUri] bool ignoreCache = false,   

        [FromUri] bool noCache = false)  

With the supporting enums: public enum ColorPalette

{   

    Original,   

    RGB,   

    CMYK,   

    Grayscale   

}  



public enum AssetConvertTo  

{  

    [Display(Name = "JPEG")]  

    Jpg = 1,  


    [Display(Name = "TIFF")]  

    Tiff = 2,  


    [Display(Name = "TIF")]  

    Tif = 3,  


    [Display(Name = "PNG")]  

    Png = 4,  


    [Display(Name = "GIF")]  

    Gif = 5,  


    [Display(Name = "TGA")]  

    Tga = 6,  


    [Display(Name = "EPS")]  

    Eps = 7  

}  

Response 200 OK


Required image is displayed.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.
ESC

Eddy AI, facilitating knowledge discovery through conversational intelligence