Resizing: Image not cropped but uses fit

2 posts, 0 answers
  1. P.J. Keukens
    P.J. Keukens avatar
    6 posts
    Member since:
    Sep 2012

    Posted 05 Jul 2010 Link to this post


    We are using Telerik RadBinaryImage in our application, now I have a problem.

    We create binary images dynamically and add them to a table cell. Depending on the number of images in the tabel cell we resize the images. Now the images that we add have the following conditions:

    rbiImg.ResizeMode = Telerik.Web.UI.



    rbiImg.AutoAdjustImageControlSize =


    So when we resize the image it should be cropped.
    We start out with an image 20px * 20px

    We then resize the image to 10px * 20px and add an extra image also 10px * 20px (so in total we have 20 pixels * 20 pixels)

    In the next round we resize the first image to 10x10 and the second 10x10 and add an extra image 10x20.

    The second image is cropped correctly but the first image isn't cropped but it uses fit.

    See the attached image:

    You can see that the image (10x10) with the black has a different hatch style as the light grey image (10x10). Both images should look like the lightgrey image.

    Is it because the original image (the one with the black background) was 20x20 and is at the end resized to 10x10 and the other image is resized from 10x20 to 10x10? They should be the same.

    Any help would be appreciated.

    Best regards Patrick


  2. Rosen
    Rosen avatar
    3215 posts

    Posted 06 Jul 2010 Link to this post

    Hi Keukens,

    Can you please post your code? This way we will get better understanding about you scenario and implementation.

    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
  3. DevCraft R3 2016 release webinar banner
Back to Top