Changing Image Size

To specify the size of a Corda® image, set the height and width attributes of the Corda Embedder.

Note: If you do not set an image size, the size of the Image Template file is used for most image formats. However, image types that require a plug-in use the default image size specified in the plug-in.

For example, to have Corda Server™ generate a Corda image of 600 pixels wide and 400 pixels high, use the following:

myImage.height = 400;

myImage.width = 600;

Alternatively, to set the size of the image to be a certain percentage of the Web page's width and height, use the htmlHeight and/or htmlWidth attributes. For example, to have the image fill 75% of the Web page's width, use the following:

myImage.htmlWidth = "75%";

htmlHeight and htmlWidth do not change the size of the image that Corda Server generates, they instruct the Web browser to scale the image to a certain size. Thus, you may sometimes find it desirable to set height and width when you set htmlHeight and htmlWidth.

Note: The htmlHeight and htmlWidth attributes can also accept height and width values in pixels, so use a percentage % sign to indicate that you are specifying a percentage.

Important: When using ColdFusion* MX with the .NET Corda Embedder, setting the height and width attributes causes an error. This is because of a bug in ColdFusion MX that does not allow the passing of integers to a COM object. Until this bug is fixed, use the two string attributes in the COM Object instead. They are called height4MX and width4MX (for example, myImage.height4MX = "350";).