Declined
Last Updated: 16 Dec 2025 15:17 by ADMIN
ADMIN
Deyan
Created on: 02 Mar 2017 13:55
Category: WordsProcessing
Type: Bug Report
1
WordsProcessing: Image SetWidth and SetHeight methods ignore respectLockAspectRatio parameter when the size is not set explicitly
This is caused by hasSize field in ShapeBase class which is set when decoding the image size. However, when SetWidth and SetHeight methods are called before the size is initialized the value of hasSize is false which causes the issue.

Workaround: Call the Size property getter before calling SetWidth/SetHeight method. See the code below:

// This line workarounds the issue with SetWidth method which does not get the correct size when locking aspect ratio. 
Size size = imageInline.Image.Size;
imageInline.Image.SetWidth(true, width);
1 comment
ADMIN
Viliana
Posted on: 16 Dec 2025 15:17

Hello,

The item is declined as it is no longer reproducible.

Regards,
Viliana
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.