Print Page | Close Window

Markup Image resize

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: MarkupLabel Control
Forum Description: Topics Related to Codejock MarkupLabel Control
URL: http://forum.codejock.com/forum_posts.asp?TID=21736
Printed Date: 19 April 2019 at 4:38pm


Topic: Markup Image resize
Posted By: JamesH
Subject: Markup Image resize
Date Posted: 21 June 2013 at 5:05pm
Could someone please explain how to get an image to resize using markup?  If I use the following:
 
<Page xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
  <TextBlock Cursor="Hand" VerticalAlignment="Center" HorizontalAlignment="Center">Enter Text Here<Image Width="200" Height="100" Source='file://C:/temp/FOV test/test.JPG'/></TextBlock>
</Page>
 
It display the top left corner of the image and then crops it to 200x100 pixels.  I want to display the whole image but resized to 200x100 pixels.
 



Replies:
Posted By: jpbro
Date Posted: 23 June 2013 at 2:17pm
Try adding a Stretch='Uniform' attribute to your Image tag.



-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: arronlee
Date Posted: 01 April 2014 at 12:04am
Here are the code I have ever used to http://www.yiigo.com/guides/vbnet/how-to-resize-image.shtml" rel="nofollow - Imports Yiigo.Image

Namespace YiigoEvaluation
Public Partial Class Form1
Inherits Form
Public Sub New()
InitializeComponent()
End Sub

Private Sub button1_Click(sender As Object, e As EventArgs)
Dim directoryName As String = "c:/YGDemo.png"
Dim ygPic As YGPic = YGDoc.LoadDoc(directoryName)
ImageManipulating.ResizePic(ygPic, 280, 280)
YGDoc.PreserveDoc(ygPic, "c:/ygpicture.png", New PNGCreator())
End Sub
End Class
End Namespace

I hope it helps. Good luck.



Best regarsd,
Arron



Posted By: drimage
Date Posted: 05 May 2014 at 11:42pm
thanks for sharing these http://www.rasteredge.com/how-to/csharp-imaging/resize-image/" rel="nofollow -



Print Page | Close Window