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

Resizing: Image not cropped but uses fit

1 Answer 35 Views
BinaryImage
This is a migrated thread and some comments may be shown as answers.
P.J. Keukens
Top achievements
Rank 1
P.J. Keukens asked on 05 Jul 2010, 11:22 AM
Hi,

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.

BinaryImageResizeMode.Crop;

 

rbiImg.AutoAdjustImageControlSize =

false;

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

 

1 Answer, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 06 Jul 2010, 07:35 AM
Hi Keukens,

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

Greetings,
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
P.J. Keukens
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Share this question
or