Phone +1.415.332.4343
  • Home
  • EQ Products
    • MediaRich ECM for SharePoint
      • Overview
      • Features
      • Benefits
      • Technical Overview
      • MediaRich for SharePoint at Work
    • MediaRich ECM for SharePoint – Online
    • MediaRich Server
      • Overview
      • Features
      • A/V Features
      • Technical Overview
      • MediaRich at Work
      • Demos
      • Use Cases
        • Asset Management
        • Batch Processing
        • Content Repurposing
        • Navigation
        • Product Visualization
      • Developer Center
    • MediaRich Hot Folders
      • Overview
    • EQ Network Beta
  • Customers
  • Partners
    • Partners Overview
    • Solution Partners
    • Technology Partners
  • News
  • Company
    • Company Overview
    • Executive Team
    • Privacy
    • Legal
    • Careers
    • Contact Us
  • Support

Script Optimization

Problem
The processing of images takes too long.

Description
There are function settings and other adjustments that can be made to a script that will speed up processing to some degree.

Solution/Discussion
Try to avoid running any of the “drawing” functions on less than 15-bit data. These functions include arc(), drawText(), ellipse(), line(), polygon() and rectangle(). (Effectively, if the function uses the ‘smooth’ parameter, it will probably slow down on paletted image data.) Whenever feasible, use the convert() function to take the image data up to 24-bits before running these functions. Anti-aliasing slows down considerably when it is trying to detect and use the most appropriate colors from an image that has a limited palette.

Many of the functions that have the ‘radius’ parameter will run much longer as higher numbers are given to that parameter. These functions include, blur(), blurGaussianBlur(), otherHighPass(), otherMaximum(), otherMinimum(), sharpenUnsharpMask() and stylizeDiffuse(). Using a number of 5 or less will usually produce satisfactory results, while even slightly higher numbers will greatly add to the processing time.

When an image is scaled to a smaller size than the original, there is often no need to use the more processor-intensive algorithms of ‘smooth’ or ‘best.’ In almost every case, the default ‘fast’ setting will produce results qualitatively similar to those from the other two algorithms and cut processing time by as much as half.

When an original image is extremely large, when the final result is never used at its full original size, and especially when it will be used as a source for several different scripts, it is best to replace it with an image that is already scaled down to something nearer the largest size needed or, preferably, exactly the largest size needed.

Whenever possible, avoid using multiframe images as sources for a MediaScript. Even when the ‘frame’ parameter is used for the load() function, the entire set of frames must be opened into memory to find the frame or frames that will actually be processed.

Back to Developer Resources

Top

Developer Resources

  • Implementation Considerations
  • API’s
  • Script Optimization
  • Function Order
  • File Size
  • XML document object
  • Examples



Products
  • MediaRich for SharePoint
  • MediaRich Server
  • MediaRich Hot Folders
  • Debabelizer
  • EQ Network

  • Demos
  • Videos
Use Cases
  • Use Cases Overview
  • Asset Management
  • Batch Processing
  • Content Repurposing
  • Navigation
  • Product Visualization
Partners
  • Partner Overview
  • Solution Partners
  • Technology Partners
News
  • News/Blog
Company
  • Company
  • Executive Team
  • Privacy
  • Legal
  • Careers
  • Contact Us
© 2004-2012 Automated Media Processing Solutions, Inc. All Rights Reserved.