Setting the layout transfrom of image without creating a new matrixtransform

I have the following code for xaml:
         <Grid Name="navigationGrid" Grid.RowSpan="2">
        <ScrollViewer Name="scrollViewer" Grid.Row="0"
                      HorizontalScrollBarVisibility="Hidden"  VerticalScrollBarVisibility="Hidden"
                      k:KinectRegion.IsHorizontalRailEnabled="true"
                      k:KinectRegion.IsVerticalRailEnabled="true"
                      k:KinectRegion.ZoomMode="Enabled" LayoutUpdated="scrollViewer_LayoutUpdated" >
            <Image Name="navigationImage" RenderTransformOrigin="0.5, 0.5"/>
        </ScrollViewer>
       </Grid>
Now I would like to change the zoom of the image manually i.e. suppose to a zoom value Z , so I do the following:
      System.Windows.Media.Matrix m = navigationImage.LayoutTransform.Value;
       m.ScaleAtPrepend(Z / m.M11), Z / m.M11, m.M21, m.M22);                      //Z is the zoom value
       navigationImage.LayoutTransform = new System.Windows.Media.MatrixTransform(m);
But after performing layoutTransform on the image, I am now not being able to use the kinect zoom gesture. I guess it is due to assigning new LayoutTransform.
So instead of new System.Windows.Media.MatrixTransform(m); I would like something like navigationImage.LayoutTransform.SetValue(ScaleTransform.ScaleXProperty, Z / m.M11); but this gives me an error
"Cannot set a property on object 'Identity' because it is in a read-only state."  So my question is how to set new value to layoutTransform.

Hi Samprit,
In my experience, if you want to zoom an image,
ScaleTransform is the simplest way:
<Image Source="{Binding ImageSource}">
<Image.RenderTransform>
<ScaleTransform x:Name="scale" ScaleX="{Binding Value, ElementName=slider1}" ScaleY="{Binding Value, ElementName=slider1}" CenterX="0.5" CenterY="0.5"/>
</Image.RenderTransform>
</Image>
<Slider Grid.Row="1" Name="slider1" Maximum="1" Minimum="0" Value="1" TickPlacement="Both" />
From code behind, changing the ScaleTransform.ScaleX/ScaleY property to adjust the zoom level.
>>But after performing layoutTransform on the image, I am now not being able to use the kinect zoom gesture. I guess it is due to assigning new LayoutTransform.
I think this question is more related to Kinect SDK, the Kinect for Windows SDKs forum is a better place to get more accurate help:
https://social.msdn.microsoft.com/Forums/en-US/home?category=kinectsdks
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • How do I import a folder of images without creating a new project?

    In Aperture 2.xxx I can import a folder of photos into the project and mimic the folder structure on my hard drive. For example, I export photos as tiffs into a folder that is a subfolder of the folder that contains the master raw files on my hard drive. If I want these new tiff files to be part of the Aperture library I simply import the folder into a project.
    With Aperture 3 I can only import a folder as a new project as far as I can tell. Is there a workaround
    to import a folder of photos as simply a new folder of the project that contains the master files?
    Thanks
    John

    Hi John,
    I also think Aperture 2 has a better import facility and organisation Than Ap 3.
    Having tried pvonks suggestion I just cannot get that to provide the folder structure you require.
    File>Import Files seems to me to have an odd behaviour. The right hand import panel does not necessarily 'see' all the Projects but does remember ones imported into. If not used before it is necessary to highlight the Project you want to import into in the Library panel which then sets the import panel to match.
    By experiment it seems the function of a new Ap 3 folder is just to contain Projects. The easiest way to achieve what you desire is to use a new folder as a bin in which to group your Project structure as you did before with folders. The effect will be the same as you are used to, only the icons will be swapped around.
    Alternatively, after importing into an existing Project use a Smart Album to collect the files by import session date and time. You can have as many Smart Albums as you need, each with a different filter setting as suits your purpose. The Import Session filter is found under the Add Rule section on the Smart Album control sheet. This way the Project is the bin and the Smart Albums represent the folder structure you want.
    AW

  • Setting up a time capsule without creating a new network.

    I want to set up my time machine but without creating a new network. However, my current network doesn't allow to connect a router to the network. When I connect the energy cable to the time capsule it keeps flashing an amber light. When I open the AirPort is says that it didn't find the base stations of AirPort and will keep searching.

    To setup a TC.. without creating a new network.. and current network doesn't allow a router to connect.. sorry you have just created a conundrum.. nobody can give you an answer to that. It is impossible to use the TC in that case. It is 100% only a network drive. You should get an external drive and plug it into the computer.
    The only solution is to have two networks.. if the current network cannot be used even with a bridged TC.
    As long as you have a Mac with both wireless and ethernet you can do it.
    See instructions I have with all the screen shots near the bottom of this thread.
    https://discussions.apple.com/thread/4817218?tstart=30

  • Publish the website to the root folder (without creating a new folder)

    Hi there! Sure this problem has already been discussed here many times and I'm not the only one who's interested this question, but how can I publish my website using FTP without creating a new folder, just to the root folder of my web hosting? Is that even possible or should I each time drag all the files from the folder created by iWeb and put them to the root folder manually? I'm a little bit confused. Guys help me with this, please! Many thanks in advance!!

    Yes, you're right, it has been discussed for the past several years and yes, you're not the only who's interested in that question.
    A simple googe search confirms it : avoid iweb sitename
    Try it, if you haven't done it already.
    Here's my answer :
    http://www.wyodor.net/htmlegg/TallCard/TallAjax.html?pg=avoidSitename

  • How to set the size of an image

    hi,
    I have a database which contain an image. now i want to retrieve this image & want to show this image in my jsp page as user's defined size. I have following code. My following code shows the original size of an image. Now i want to see different size of this image. How is this possible? I know control the size of this image after saving this image
    in a file. but i want to control the size of this image without saving this image in a file? IS it possible ? Is there anybody can help me?
    Please help me.
    ResultSet rs = null;
    PreparedStatement ps=null;
         InputStream sImage=null;
         byte[] imagebyte=null;
         String var;
         String name=request.getParameter("RegName") ;
         String image =request.getParameter("ImageFile");
         out.println(name);
         out.println(image);
         out.println();
         ps=con.prepareStatement("insert into t_image (ID, Image) values(?,?);");
           File file =new File(image);
        FileInputStream in = new FileInputStream(file);
        ps.setInt(1,1234);
        ps.setBinaryStream(2,in,(int)file.length());
        ps.execute();  
        rs =stm.executeQuery("select Image from t_image where ID=1234");
        if(rs.next()) {
       imagebyte =rs.getBytes(1);
        response.reset();
        response.setContentType("image/jpeg");
        %>
    <%
    response.getOutputStream().write(imagebyte);
    %>
    <%
        response.flushBuffer();
    %>With regards
    Bina

    hi,
    I have a database which contain an image. now i
    want to retrieve this image & want to show this
    image in my jsp page as user's defined size. I have
    following code. My following code shows the original
    size of an image. Now i want to see different size
    of this image. How is this possible? I know control
    the size of this image after saving this image
    n a file. but i want to control the size of this
    image without saving this image in a file? IS it
    possible ? Is there anybody can help me?This has nothing to do with JDBC; you can only store and retrieve the image you have and there's no image manipulation functions in JDBC (nor should there be).
    I can see 2 options:
    1) serve the image file as is, but in the jsp that writes the html that contains the "<img>" tag that gets it, use the "height" and/or the "width" to scale the suppied image to presentation size you want.
    2) find some image manipulation code that will convert the image into the size you want
    Option 1 will work well if the problem you have is merely refining the image size for presentation. Option 2 is your only coice if it's the image files size itself you really want to change, not just it's appearance on a page.

  • How can I set the size of an image in java?

    How can I set the size of an image in java? I have to choose the width and height of image...thanks to everybody...sorry for my english :-)

    Hi 43477
    Can you provide more details, do you want to setsize to display an image on a screen of when saving image etc?
    PS.
    There is a good invention called googlegoogle is good, but sometimes it's better to use more specific search, there is a search field avove on this page :)

  • How do I change the perspective of an image not created in Illustrator?

    I want to change the perspective of an image I created using another program. I want to add this image to a project I am working on using Illustrator, but the perspective is off.

  • How do i set the umask on a share i created with SharePoints?

    how do i change the umask on a share i created with SharePoints?
    user's drop files into the share and the permissions are set wrong. both the owner and group along with the mode.
    how can i set the default permissions given to newly created files by any user? prefably a non-unixish way but i'll take whatever i can get. tried tinkertool but that didn't work.
    i read other forums on macfitix which suggested changing the umask. i am not really sure how to convert integer to octal though. the fix needs integer. i dont know how to convert the permissions i need represented in octal to integer.
    i also read the manual on the chmod utility which suggested changing the set on write bit to 4000 so that the newly created files inside a directory would inheret the parent owner etc.. in theory this would work for me. i did that, but it didn't make a lick of a difference. said only on supported OSes. i take it os x must not support this.
    the permissions i need to set are 664 or read/write for owner and group and read only for everyone else. when the files get dropped right now they default to 600. not really sure how to convert that to integer or octal. apparently the umask equalivant is represented differently but also called octal but i do not understand why.
    hope someone can bring some clarity to my confusion.
    MacBook Pro   Mac OS X (10.4.8)  

    You may want to post your question in the SharePoints forums:
    http://hornware.com/discussion/

  • Exit to set the automatic PGI and picking while creating outbound delivery

    Hi experts,
    Could anybody suggest how to set the automatic PGI and Picking while creating outbound delivery.
    Currently we are settting VBUK-WBSTK field with value C. But PGI is not happening.
    kindly help me.
    Regards,
    Ravi

    Hello Parihar,
    thanks for reply.
    yes we know that "This process of picking and GI involves reducing the stock and allocating the goods to the delivery"
    if you go for Custom program and Use FM WS_DELIVERY_UPDATE, we can do Picking and PGI.
    our requirement is to do pickong and PGI while creating Delivery it self, based on this output types will be processed.

  • My previous method for payment on itunes was debit card but now I dont have one.  How do I change to no card without creating a new apple id

    My previous method for payment on itunes was debit card but now I dont have one.  How do I change to no card without creating a new apple id?  It tells me to update payment details when I try to update apps but it only has visa, mastercard, amex and maesto.  I dont have any of them.  I did previously use visa but I dont have the card anymore and cant get another one.  Please can someone help me set it up so I dont need a payment method.  Thanks

    Thanks for you reply.  Is that the only way as it would cost me £15?

  • How can I create a new page in pages, without creating a new section?

    how can I create a new page in pages, without creating a new section?

    Good morning graywright,
    It sounds as if what you are wanting to do in the Pages application is to insert a Page Break. Follow the steps in this article -
    Pages '09: Inserting a Page Break
    In a word processing document, click where you want the break to occur, and then choose Insert > Page Break. 
    To remove a page break, click at the beginning of the line that follows the break and press the Delete key.
    In a page layout document, to insert a new page in your document, click Pages in the toolbar and choose from the template page options available.
    Thanks for using Apple Support Communities.
    Best,
    Brett L 

  • TS4020 Can I change my iCloud email address name without creating a new account?

    CCan I change my iCloud email address name without creating a new account?

    Once you have created an iCloud account and chosen an @icloud.com address to go with it you can't change the address (short of creating an entirely new account).
    However, all is not lost. You can add up to three 'email aliases' - these are additional addresses (not accounts) which deliver into the same inbox as the main account. (In fact it's a good idea to give out alias addresses, rather than the main address, because if they attract spam you can easily change them.) (New aliases can only be @icloud.com ones; @me.com addresses cannot now be created.)
    You should be aware before you start that once you've created an alias you cannot turn that address into a full iCloud account or move it to another account.
    More information on aliases here: http://help.apple.com/icloud/#mm6b1a490a

  • Is it possible to loop AI Voltage readings without creating a new task (NI-DAQmx)?

    I would like to repeatedly make n Analog readings in a program, however, I am unable to accomplish this without creating a new task each time... perhaps I'm doing something wrong.
    Here is my pseudo-code:
    DAQmxErrChk(DAQmxCreateTask("", &taskHandleAI));
    DAQmxErrChk(DAQmxCreateAIVoltageChan(taskHandleAI, ...));
    DAQmxErrChk(DAQmxCfgSampClkTiming(taskHandleAI,...));
    Loop start
    DAQmxErrChk(DAQmxStartTask(*taskHandleAI));
    DAQmxErrChk(DAQmxWaitUntilTaskDone(*taskHandleAI, 0.001));
    DAQmxErrChk(DAQmxReadAnalogF64(*taskHandleAI, ...));
    DAQmxErrChk(DAQmxStopTask(*taskHandleAI));
    do_something();
    Loop end
    The first read seems to work fine, however, all subsequet reads gets the following error message:
    DAQmx Error: Measurements: Task specified is invalid or does not exist.
    Status Code: -200088
    Does anyone have a clue what is happening?

    Sorry... is it possible to move a post, or should I simply start another one?
    Also. I don't fully understand what you mean by moving start & stop outside of the loop... the 'do_something()' part parses the reading results that was just read...
    are you saying I should not run StartTask/StopTask for each iteration of the loop? 

  • Move album from one library to another without creating a new project

    I accidentally added photos to a new album in the wrong library. I want to move this album with masters and versions to the right library. I exported the album as a project. Then I import the project into the library where I want the album to appear. Importing using either merge or add creates a new project which contains the album. Is there a way to put the album into an already existing project without creating a new one? Using Aperture 3.1.1.

    As Frank said, masters and versions all move together. They can't be separated because a version can't exist without a Master file. In fact, when working in RAW everything you see in Aperture is a version since RAW files need to be rendered for onscreen viewing. The masters are on your hard drive somewhere (managed or referenced) and what you see when you import a RAW file is simply an unedited version 1.
    This is one of the most important concepts to grasp: you're never actually working with the masters. Aperture is just a big database pointing to files and applying instructions (adjustments) to those files in realtime on your screen.
    Just remember that a picture and any of its versions can appear in many albums, in many different places. But as I said earlier, it can only appear in one project. Move a picture from a project and everything follows. Versions are just different renditions of the same master file.
    Not sure I'm clear - hopefully I'm helping a bit!

  • Why can't I create a document in my Facebook group on my iPad? It won't let me input any text into the text box field after I create a new document. Thanks.

    Why can't I create a document in my Facebook group on my iPad. It won't let me input any text into the text box field after I create a new document. Thanks.

    Just thought I'd add my solution, I decided to go with WebDAV and I think it actually works better than the iTunes way, the steps are pretty much the same but avoiding the iTunes interface just makes things easier and faster.
    I followed this guide but it does have a small mistake in the httpd-dav.conf file, on line 2, where it's WebServer/WebDAV">, it should be <Directory "/Library/WebServer/WebDAV">.
    The tricky part is setting permissions which if wrong will give you errors when connecting with the iPad, I opted to set all to Read&Write since my home network has a hardware firewall. Another convenience was to add an alias to the webdav share on the Desktop.
    I'm still expecting the call from Apple but even if they fix the iTunes I'm sticking with WebDAV, atleast until I see what's new with iOS5 and iCloud this fall which should bring true sync for documents (I'm hoping that they will offer encryption with my own keys, if not, then I'll probably keep using WebDAV).

Maybe you are looking for

  • Non-English character problem in Oracle 10g Express Edition

    Hi There; I have a table. It's name is INSTITUTION. It has a NUMBER INS_ID and NVARCHAR2(50) INS_NAME . INS_NAME can contain Turkish characters, such as "ğ,ü,ş,ç,ö". According to business logic, there can not be a repetition on the INS_NAME. User wil

  • Change the value of a field in a form when the form is displayed

    Hello I have a report which has a link to a form for updating the records. I have used a link to the form from report which displays the the record to be updated i.e it gets default values from the report. I need to change one of these values at the

  • Adjustment Accounts for GR/IR clearing (OBYP)

    Hi, what is the objective behind defining the adj acct and target acct setting. As per my info, In this activity you define the numbers of the adjustment and target accounts for the automatic postings for the GR/IR clearing account. Transfer postings

  • Borderless 8.5x11 on DeskJet 9800

    I've seen this question asked in various forms all over the forums and net, but it's rarely this printer with this paper size, and it's rarely this printer and these dimensions. So, here's hoping someone here will have an answer for it. I am having a

  • Which sRGB Profile to use (HP sRGB Profile, ICC BPC, ICCnoBPC, or no profile)?

    Hi everyone, May I ask something of you guys? I have a question that no one can seem to answer. I don't know which is the best profile to use--the HP sRGB Profile, the ICC sRGB BPC, the ICC sRGB with no BPC, or no profile (just colorspace tagged as s