RadBinaryImage automatically calculates the image size based on the image data and sets its Width and Height properties if you do not explicitly specify them. However, this happens as late as the PreRender phase of the control. This means that you can get the calculated Width and Height of the RadBinaryImage at the earliest in the OnPreRenderComplete
method of the page:
Unfortunately, this point in the page life cycle may be too late for your you. Alternatively, you can create method that will take the image data in the form of a byte
and convert it to a System.Drawing.Image
(MemoryStream stream =
img = Image.FromStream(stream);
"The provided binary data may not be valid image or may contains unknown header"
The above static method will create an Image object out of your image data. You can then use the image Width and Height properties to get the original image size. This is the most straightforward way of getting the size of your image from its binary data.
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Public Issue Tracking
system and vote to affect the priority of the items