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

how does resize work

3 Answers 133 Views
BinaryImage
This is a migrated thread and some comments may be shown as answers.
ManniAT
Top achievements
Rank 2
ManniAT asked on 07 Feb 2010, 04:36 PM
Hi,

since the documentation is a bit poor and I'm not willing to play around I simply ask it here.

How does RadBinaryImage resize images?
Does it use a "best fit" algorithm or does it simply "cut" the longer side?

What I mean with "best fit" is that an image is sized in a manner that it is as large as possible without loosing it's aspect ratio.
Example:
Max. Size 200, 200
Given Image: 300, 180 -- scaled to 200, 120
Given Image: 300, 400 - scaled to 150, 200
....

Regards
Manfred

3 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 08 Feb 2010, 08:51 AM
Hello Manni,

Actually both of them are available. As stated in the docs:

ResizeMode Specifies whether the image should be sized automatically if Width and Height of the image are set in pixels. Possible values are:

  • Crop (the image will be trimmed)
  • Fit (the image will be sized to fit the given dimensions)
  • None (default)

I hope this helps. 

Sincerely yours,
Rosen
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
Sebastien Desemberg
Top achievements
Rank 1
answered on 02 Mar 2010, 01:06 PM
Can I resize the image on Uploading?
I used this demo:

http://demos.telerik.com/aspnet-ajax/controls/examples/integration/raduploadinajaxifiedgrid/defaultcs.aspx?product=binaryimage

User may upload a HUGE file, I want to save just a thumbnail in the database.
0
Rosen
Telerik team
answered on 05 Mar 2010, 08:58 AM
Hi Sebastien,

In order to achieve this, you should handle updating and manually modify (resize) the image's data before data is pushed to the DB. You may check this RadListView demo for an idea on how to hook and modify upload value  on update.

Best wishes,
Rosen
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? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
BinaryImage
Asked by
ManniAT
Top achievements
Rank 2
Answers by
Rosen
Telerik team
Sebastien Desemberg
Top achievements
Rank 1
Share this question
or