The behavior you are observing with RadBinaryImage is expected. When you set ResizeMode="Fit"
RadBinaryImage takes the width and height you have set and tries to adjust them to fit the image dimensions without resizing the image itself. So what happens:
1. You set Width="1000px", Height="600px" initially
2. You pass image data containing an 800x600 image.
3. RadBinaryImage calculates the effective image size and adjust its width to 800px to match the 800x600 pixel dimension
At this point, the image is rendered and RadBinaryImage has Width="800px", Height="600px".
What happens when you postback and rotate the image to the right. The image dimensions become 600x800. So what happens now:
1. RadBinaryImage has a Width="800px" and Height="600px" set from the previous page life cycle.
2. You give it image data containing an 600x800 image.
3. To accommodate this image in the specified binary image dimensions, RadBinaryImage needs to set keep the height of 600px and set a width of 450px! This is done so that a 600x800 image can fit with proportional scaling.
At this point, the image is rendered in 450x600. The new RadBinaryImage dimensions are 450x600. On each rotation, the image will be smaller and smaller because RadBinaryImage has smaller and smaller dimensions to fit the image in. You can notice the image dimensions after the next rotation will be 450x337, and so on.
Resetting the image width and height to 800x600 on every postback works around this behavior and now RadBinaryImage always has an 800x600 pixel area to fit the image in.
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