SharinPix Transformation - Flow
Creation of flow
This section demonstrates how to generate a URL of an image with a custom transformation in a flow that invokes the Apex Class sharinpix__TransformImage.
- Create a new Flow on SharinPix Image creation.
- Create a new variable and assign the record's Image Public Id to it.
- Add an Apex Action
- Select Apex class sharinpix__TransformImage
- Field API Name: Enter the API name of the field in which you want to save the URL. Example: ImageUrl__c.
- Image Public ID: Enter the image's public ID.
- Transformation JSON: Enter the transformation JSON. Example: "[{ "color": "#19354d","overlay": { "font_size": 65, "font_family": "Arial", "font_weight": "normal", "text": "FirstName LastName" }, "gravity": "north_west", "x": 425, "y": 210 }]".
- Record ID: Set the Record ID to true and use the object record id. (Note: The ID of the record in which the transformed URL should be saved. Leave blank to use the SharinPix Image record itself.)
To change the format of the transformed image to JPG, add {"format": "jpg"}
at the end of the transformation JSON.
Example: [{ "color": "#19354d","overlay": { "font_size": 65, "font_family": "Arial", "font_weight": "normal", "text": "FirstName LastName" }, "gravity": "north_west", "x": 425, "y": 210 }, { "format": "jpg" }]
.
Note: Only the JPG format is supported.
0 Comments
Add your comment