API
  • Introduction
  • Overview
    • Introduction
  • REST API
    • Invoking Platform from external apps
  • Client-side variables
    • Inside a client-side Javascript action
  • Client-side Javascript API
    • Global methods and UI API
    • Uploading files
    • Window
  • Server-side issues
    • Designing a Web Service
    • Server-side Javascript Debugger
  • Server-side variables
    • Inside a business component
    • Inside a server-side Javascript action
  • Server-side Javascript API
    • Monitoring
    • Alert
    • Email
    • HTTP
    • JWT
    • Ldap
    • CSV-Text File
    • Image File
    • Excel File
    • PDF File
    • Other Files
    • Other
    • MongoDB
    • Reporting
    • Sql
    • XML
    • Activiti BPM
    • Archiflow
    • Import Cells from xlsx
    • Import Rows from csv, xls and xlsx
    • User management
    • Whatsapp
    • Chips panel
    • Google Cloud Storage
    • Google GSuite
    • Google Spanner
    • Google BigQuery
    • Google Datastore
    • Google App Engine
    • Google Sheet
  • Function JSS EE
  • Function JSS
Powered by GitBook
On this page
  • Convert a TIFF image to a JPEG image
  • Scale a jpg image, using width & height
  • Scale a jpg image, using a scale

Was this helpful?

  1. Server-side Javascript API

Image File

Convert a TIFF image to a JPEG image

Syntax

utils.convertTifToJpg(Long tifDirId,String tifFileName,Long jpgDirId,String jpgFileName,Float compressionFactor);

Details

tifDirId - folder identifier, where the input TIFF imagefile is already stored 
tifFileName -TIFF image file name, stored in the folder identified by tifDirId 
jpgDirId- folder identifier, where the JPEG image will be saved 
jpgFileName- file name for the JPEG image to create 
compressionFactor- positive number <= 1.0, used to define the compression factor the JPEG image

Scale a jpg image, using width & height

Create an image jpg file, starting from an already existing jpg image file and scale it, using a new width x height.

Syntax:

  utils.scaleJpgFile(
    Long srcJpgDirId,
    String srcJpgFileName,
    Long destDirId,
    String destFileName,
    Long maxWidth, 
    Long maxHeight
  );

srcJpgDirId

directory id where the already existing jpg image file has been stored

srcJpgFileName

already existing jpg file name

destDirId

directory id where creating a new scaled jpg image

destFileName

jpg file name to create, generated starting from the source image

maxWidth

new image width

maxHeight

new image height

Scale a jpg image, using a scale

Create an image jpg file, starting from an already existing jpg image file and scale it, using a scale to reduce/enlarge it.

Syntax:

  utils.scaleJpgFile(
    Long srcJpgDirId,
    String srcJpgFileName,
    Long destDirId,
    String destFileName,
    Double scale
  );

srcJpgDirId

directory id where the already existing jpg image file has been stored

srcJpgFileName

already existing jpg file name

destDirId

directory id where creating a new scaled jpg image

destFileName

jpg file name to create, generated starting from the source image

scale

scale ratio

PreviousCSV-Text FileNextExcel File

Last updated 3 years ago

Was this helpful?