Considerations for using graphics

  • Avoid large images and use GIF images where possible.Operating system and hardware may have limitations when handling graphic files.
    To convert images to .gif files, you can use the SaveAsGifs method exposed by the CRMGraphicBlock object. For example:
    Copy
    <script language=javascript> 

    if (screen.colorDepth<=8)
    {
        graphic.SaveAsGifs=true
    }

    </script>


  • Be conservative with animations. Large animations can consume a lot of processor time on a client machine. Consider decompression of a 50-frame animated .gif file that is 250 x 250 pixels using 24-bit color. In this case, all 50 frames require roughly 9 MB of data if stored in memory simultaneously (250 * 250 * (24/8) * 50).

    If the .gif file is animated over three seconds, that's 3 MB per second of data, which requires a lot of processor power.
    When an animated .gif file is looping, the image is continually decoded from a copy of the animation stored on disk. Therefore, processor power is used instead of consuming large amounts of memory.