This is a migrated thread and some comments may be shown as answers.

Scale Images without stretching

3 Answers 74 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 30 Nov 2013, 11:44 PM
Is there a way to scale a Rad Rotator image proportionally without stretching it? I basically want an image to take up the entirety of the rotator's box with no white-space on the X or Y axis, but I don't want the image to be distorted. It works now when I tell the image/item to have 100% width, but if any image is REALLY wide, I have whitespace on the top and bottom of the fixed-size rotator. The same applies if I size an image/item with 100% height... I just want the whole screen -filled- regardless of the dimensions of the image, but no stretching.

This is for a full-screen rotator that displays images on a TV, where the administrator simply drags images into a folder.

3 Answers, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 04 Dec 2013, 06:21 PM
Hi Alex,

The RadRotator cannot handle this type of resizing of the images in its items out-of-the-box. My suggestion is that you prepare on the server a version of every uploaded image that will fit in the viewport of the rotator. Then the RadRotator control can be databound with the new images in order to display them without gaps.

Regards,
Slav
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Alex
Top achievements
Rank 1
answered on 04 Dec 2013, 07:48 PM
Thanks for the reply. What I'd really like to know is if anyone knew of any sort of third-party javascript(s) to accomplish this. I know radrotator itself can't do it
0
Slav
Telerik team
answered on 09 Dec 2013, 11:05 AM
Hello Alex,

It is recommended to perform such modifications of the images on the server-side. For this purpose you can utilize the server-side API of the RadImageEditor and more specifically the EditableImage class. In the help article EditableImage Members (section RadImageEditor EditableImage Methods) you can find more information about the available methods for modifying the images. The one you will need in this scenario is Resize.

Regards,
Slav
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Rotator
Asked by
Alex
Top achievements
Rank 1
Answers by
Slav
Telerik team
Alex
Top achievements
Rank 1
Share this question
or