Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > MarkupLabel Control
  New Posts New Posts RSS Feed - Markup Image resize
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Markup Image resize

 Post Reply Post Reply
Author
Message
JamesH View Drop Down
Senior Member
Senior Member


Joined: 01 December 2004
Status: Offline
Points: 149
Post Options Post Options   Thanks (0) Thanks(0)   Quote JamesH Quote  Post ReplyReply Direct Link To This Post Topic: Markup Image resize
    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.
 
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1357
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
arronlee View Drop Down
Newbie
Newbie


Joined: 04 September 2013
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote arronlee Quote  Post ReplyReply Direct Link To This Post Posted: 01 April 2014 at 12:04am
Here are the code I have ever used to resize images:
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

Back to Top
drimage View Drop Down
Newbie
Newbie


Joined: 05 June 2013
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote drimage Quote  Post ReplyReply Direct Link To This Post Posted: 05 May 2014 at 11:42pm
thanks for sharing these image resizing codes, these are C# codes?  do you have any idea how to crop image with C# sample codes? i'd like to display image with smaller size.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.

This page was generated in 0.391 seconds.