We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

image resize

Thread ID:

Created:

Updated:

Platform:

Replies:

76008 Aug 19,2008 04:17 PM Aug 20,2008 05:25 AM ASP.NET Web Forms (Classic) 1
loading
Tags: DocIO
peter crymble
Asked On August 19, 2008 04:17 PM

Hi

I have a word template - i added images in and I use the following code to size them:

Dim pic6 As IWPicture = CType(IIf(TypeOf bk.InsertParagraphItem(ParagraphItemType.Picture) Is WPicture, bk.InsertParagraphItem(ParagraphItemType.Picture), Nothing), WPicture)
pic6.LoadImage(System.Drawing.Image.FromFile(dataPath2 & dr("image6")))

pic6.WidthScale = 16.83F

pic6.HeightScale = 16.83F

That works fine - but what is 'F'? I have a problem where by pictures of different resolutions display at different size. So two images 200x200pixels may display differently depending on the resolution. Is there any way to resize using mm or cm?

Thanks
Peter


Bhuvaneswari P [Syncfusion]
Replied On August 20, 2008 05:25 AM

Hi Peter,

Thank you for your interest in Syncfusion products

In the point specification ‘F’ represents the float value. We can set the DocIO units as only points. You have to convert from other unit to pixel. You can make use of PointsConverter.FromCm(1) class to convert the other units[cm] to points while setting the height and width of the image. Please use the Picture height and width property to set the image size.


float a=PointsConverter.FromCm(10);
picture.Height = a;
picture.Width = a;


Please let us know if you have any other questions.

Best Regards,
Bhuvana



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;