• <Helps for GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • CSPro Statements and Functions
      • Statement Format Symbols
      • Alphabetical List of Functions and Statements
      • List of Reserved Words
      • Deprecated Features
      • Declaration Statements
      • Array Object
      • Audio Object
      • Barcode and QR Codes
      • Document Object
      • File Object
      • Freq Object
      • Geometry Object
      • HashMap Object
      • Image Object
        • Image Statement
        • Image.Load Function
        • Image.Save Function
        • Image.Width Function
        • Image.Height Function
        • Image.Resample Function
        • Image.TakePhoto Function
        • Image.CaptureSignature Function
        • Image.View Function
        • Image.Clear Function
      • List Object
      • Map Object
      • Path
      • Pff Object
      • SystemApp Object
      • ValueSet Object
      • Program Control Statements
      • Assignment Statements
      • Data Entry Statements and Functions
      • Batch Edit Statements
      • Numeric Functions
      • String Functions
      • Multiple Occurrence Functions
      • General Functions
      • Date and Time Functions
      • External File Functions
      • Synchronization Functions
      • Export Attributes
    • Templated Reporting System
    • HTML and JavaScript Integration
    • Appendix
  • <Helps for CSEntry>
  • <Helps for CSBatch>
  • <Helps for CSTab>
  • <Helps for DataViewer>
  • <Helps for TextView>
  • <Helps for TblView>
  • <Helps for TRSWin>
  • <Helps for CSDeploy>
  • <Helps for CSPack>
  • <Helps for CSFreq>
  • <Helps for CSSort>
  • <Helps for CSExport>
  • <Helps for CSReFmt>
  • <Helps for CSDiff>
  • <Helps for CSConcat>
  • <Helps for TRSSetup>
  • <Helps for ParadataViewer>
  • <Helps for ParadataConcat>
  • <Helps for CSIndex>
  • <Helps for Excel2CSPro>
  • <Helps for CSWeb>

Image Statement

Format
image image_name;
Description
The image statement creates an image with the name image_name. The image name must be unique and must contain only letters, numbers, or the underscore character. The name must begin with a letter. You can declare images globally in PROC GLOBAL or locally in functions or procedures.
Example
image roof_photo;

if roof_photo.takePhoto("Take a photo of the household's roof.") then

   
// in case the device's camera takes photos with an unnecessarily
    // large resolution, resample the image to a more reasonable size
    roof_photo.resample(maxWidth := 1600, maxHeight := 1200);

   
// save the image using the household key...
    string base_filename = path.concat(application, "Roof Photos", key(HH_DICT));

   
// ...with 90 quality to prevent the JPEG from being too large
    roof_photo.save(base_filename + ".jpg", quality := 90);

endif;
See also: Image Object