how does resize work

4 posts, 0 answers
  1. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 07 Feb 2010 Link to this post


    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.
    Max. Size 200, 200
    Given Image: 300, 180 -- scaled to 200, 120
    Given Image: 300, 400 - scaled to 150, 200

  2. Rosen
    Rosen avatar
    3215 posts

    Posted 08 Feb 2010 Link to this post

    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,
    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.
  3. DevCraft R3 2016 release webinar banner
  4. Sebastien Desemberg
    Sebastien Desemberg avatar
    15 posts
    Member since:
    Nov 2009

    Posted 02 Mar 2010 Link to this post

    Can I resize the image on Uploading?
    I used this demo:

    User may upload a HUGE file, I want to save just a thumbnail in the database.
  5. Rosen
    Rosen avatar
    3215 posts

    Posted 05 Mar 2010 Link to this post

    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,
    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.
Back to Top