Print Page | Close Window

Wrong behavior of image scaling

Printed From: Codejock Forums
Category: General
Forum Name: XAML Snippets
Forum Description: Post your XAML snippets here for everyone to enjoy :)
URL: http://forum.codejock.com/forum_posts.asp?TID=12736
Printed Date: 23 April 2024 at 4:03am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Wrong behavior of image scaling
Posted By: BerntK
Subject: Wrong behavior of image scaling
Date Posted: 20 November 2008 at 4:15am
Hi,

The Stretch-Attribute is not supported like:

<Image
Source="filename"
Stretch="None|Uniform|UniformFill|Fill"
/>

Default behavior should be "Unifom" whitch means:
Resizes the original content to fit the destination and preserves the native aspect ratio.

You always show the full image.

.) Is there a way to scale the image?
.) Do you plan to implement "Stretch"?

Thanks,
Bernt




Replies:
Posted By: Oleg
Date Posted: 20 November 2008 at 7:40am
Hi,
 
Thanks, good note. We will add it. Send email to support, I will attach modified file.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: cryimage
Date Posted: 06 May 2013 at 11:13pm
http://www.rasteredge.com/how-to/csharp-imaging/scale-image/" rel="nofollow - image scale methods

public static void ScaleImageDemo()
{
string fileName = "c:/Sample.png";

REImage reImage = REFile.OpenImageFile(fileName);

ImageProcessing.ApplyResize(reImage, 0.5f);

REFile.SaveImageFile(reImage, "c:/reimage.png", new PNGEncoder());
}




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net