croppy-image
Reactive icon

Croppy Image

Stable version 1.2.0 (Compatible with OutSystems 11)
Uploaded
 on 03 April 2024
 by 
0.0
 (0 ratings)
croppy-image

Croppy Image

Documentation
1.0.0
Installation:
  • Within your application, import the "Croppy Image" through "Manage Dependencies" and select all necessary elements.


UI Flows (User Interface) Elements for Use on Screens:

  • Croppy_BinaryData: This block is used for images of type "BinaryData".
  • Croppy_ExternaUrl: This block is used to use images via an external URL.


Client Actions for Use in Buttons or Other Actions:

  • Croppy_Result: This action is used to obtain the final result of the cropped image and return a "BinaryData".
  • Croppy_Rotate: This action is used to rotate an image. 


Creating your First Croppy Image:


1. First Step: Choose a block to use, there are two different types to call an image for cutting:

  • Croppy_BinaryData: It is necessary to have a variable of type "BinaryData".
  • Croppy_ExternalUrl:  You must enter a valid external URL for an image.


2. Second Step:  Action to Return the IdCropImage:

  • Each new cut receives a unique ID that serves to identify which image you want to obtain the record result in the future.
  • Create the action "Return_IdCropImage" (you can use whatever name you want).
  • After creating the action, create a new variable inside the screen (outside the action) to store this ID. This variable must be of type "Object".
  • In this example, create a variable called "Id_CropImage".
  • Within the action, use an "Assign" to store in the "Id_CropImage" variable the value returned from the "IdCropImage" input that comes from the "Return_IdCropImage" action.

Getting the Cropped Image Result:

  • 1. Create a button called "Result" or an action to return the cropped image.
  • 2. In the button action, call "Client Action" > "Croppy_Result", and select the corresponding "Id_CropImage". Thus, this action will return the result of the new image in "BinaryData", allowing you to make an "Assign" of the BinaryData or use it to insert the image into the database.