How to save Image from binding FlipView?

I bind 4 images in my FlipView, how save an binding Image to Picture Library;
<FlipView Name="display1"  ItemsSource="{Binding}" Foreground="#FFE6D52E" HorizontalAlignment="Center" VerticalAlignment="Center           
            <FlipView.ItemTemplate>
                <DataTemplate>                  
                            <Image x:Name="image" Source="{Binding  Path=Image}" Stretch="UniformToFill"/>                
                </DataTemplate>
            </FlipView.ItemTemplate>
        </FlipView>
private void SaveImage_Click(object sender, RoutedEventArgs e)
              var img = display1.SelectedItem as WriteableBitmap;
                       StorageFolder appfolder = await   KnownFolders.PicturesLibrary.CreateFolderAsync("myimage",          
CreationCollisionOption.OpenIfExists);
        StorageFile myFile = await appfolder.CreateFolderAsync("imge1.jpg", CreationCollisionOption.ReplaceExisting);    
        img.Invalidate();
        using(Stream strem = await myFile.OpenStreamForWriteAsync())
            img.Savejpeg(strem, img.PixelWidth, img.PixelHeight, 0, 100);
//for me it is  hard to save binding files,I cant save any image

Hi Icce cage,
Per my understanding, you bind the path of image to Image control, so you get image path string from display1.SelectItem property. Try finding Image from this path in installation folder and then copy it to Picture library. Please try the following code
snippet.
Custom class to hold the image object.
public class CustomClass
public string ImagePath { get; set; }
public string ImageName { get; set; }
Initial image sources.
private void Page_Loaded(object sender, RoutedEventArgs e)
images = new System.Collections.ObjectModel.ObservableCollection<CustomClass>();
images.Add(new CustomClass() { ImagePath = "/Images/1.png", ImageName = "1.png" });
images.Add(new CustomClass() { ImagePath = "/Images/2.png", ImageName = "2.png" });
images.Add(new CustomClass() { ImagePath = "/Images/3.png", ImageName = "3.png" });
images.Add(new CustomClass() { ImagePath = "/Images/4.png", ImageName = "4.png" });
images.Add(new CustomClass() { ImagePath = "/Images/5.png", ImageName = "5.png" });
display1.ItemsSource = images;
XAML.
<FlipView RightTapped="display1_RightTapped" Name="display1" Foreground="#FFE6D52E" HorizontalAlignment="Center" VerticalAlignment="Center" >
<FlipView.ItemTemplate>
<DataTemplate>
<Image x:Name="image" Source="{Binding Path=ImagePath}" Stretch="UniformToFill"/>
</DataTemplate>
</FlipView.ItemTemplate>
</FlipView>
Save image to picture library.
private async void display1_RightTapped(object sender, RightTappedRoutedEventArgs e)
CustomClass data = display1.SelectedItem as CustomClass;
if (data!=null)
var installation = Windows.ApplicationModel.Package.Current.InstalledLocation;
var imagesfolder =await installation.GetFolderAsync("Images");
var file = await imagesfolder.GetFileAsync(data.ImageName);
await file.CopyAsync(KnownFolders.PicturesLibrary);
Regards,
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

  • E61i -- HOW TO SAVE IMAGES FROM WEBSITE WHILE BROW...

    ANYBODY KNOWS HOW TO SAVE IMAGES FROM WEBSITE WHILE BROWSING IN E61i ???
    ABDULLAH SHAHID SHEIKH
    IMANGROUP, IMAN ROAD, NOORPUR, ALI BLOCK, MUSLIM TOWN, FAISALABAD, PAKISTAN.
    TEL. 0092418782792-93
    CELL. 00923008651424

    which version should i use ,, i mean suitable for my E61i,,, the opera mini or the opera mobile????
    is opera mini can save the images as well???
    25-Aug-200702:43 PM
    iantaylor27 wrote:
    Hi
    If you use opera mobile, it aloows saving of images to memory card etc
    www.opera.com
    ABDULLAH SHAHID SHEIKH
    IMANGROUP, IMAN ROAD, NOORPUR, ALI BLOCK, MUSLIM TOWN, FAISALABAD, PAKISTAN.
    TEL. 0092418782792-93
    CELL. 00923008651424

  • How to save Image from Oracle form!!?

    Hello Every Oracle forms developer
    i have a from contains block with Blob column ...i store image in it
    i have used read_image_file to view image in form and insert it into DB 11gR2
    now ..* I want to create procedure in form_button to download image from db ..and save it in local drive ...*
    thanks in advance

    see this example in pl/sql
    DECLARE
    -- Data Variables
    v_blob BLOB;
    v_data_length NUMBER;
    -- Loop Control Variables
    v_offset NUMBER := 1;
    v_chunk CONSTANT NUMBER := 32767; -- maximum chunk size
    -- UTL_FILE variables
    fh UTL_FILE.file_type;
    BEGIN
    v_blob := ... populate the blob variable here
    v_data_length := DBMS_LOB.getlength (v_blob);
    -- Open the file
    fh := UTL_FILE.fopen ('RETR_DIR', 'myfile.dat', 'wb', v_chunk);
    LOOP
    -- Exit when our file offset is bigger than our file
    EXIT WHEN v_offset > v_data_length;
    -- Write the output chunk by chunk
    UTL_FILE.put_raw (fh, DBMS_LOB.SUBSTR (v_blob, v_chunk, v_offset), TRUE);
    -- Increment the offset by the amount written
    v_offset := v_offset + v_chunk;
    END LOOP;
    -- Close the file
    UTL_FILE.fclose (fh);
    END;
    Regards

  • How to save image from email to iPhoto

    trying to save image attachment from email to iPhoto

    What is the problem? What does not work?
    Either drag the attachment from the mail to the iPhoto con in the Dock, or ctrl-click the attachment and use the option "Export to iPhoto" from the pop-up menu (in Mail in MacOS X 10.10). Don't remember, if this worked in Mail in Mac OS X (10.5.8), as your signature is showing.

  • How to save image from Clipboard to disk?

    Hello;
    I want to take a screen capture of the entire screen, not only the front
    panel and save it to a file. Don't care about the image format right now.
    I am able to simulate a PrintScreen key using a call to user32.dll
    "keybd_event" in Win2K, but I am stuck here. How do I get that image that is
    now in the clipboard to disk? I have searched NI's website high and low, and
    nothing yet.
    Thanks is advance,
    /JB
    LabVIEW 6.1

    I've kind of done it "programmatically".... using the "system exec.vi" I've
    started mspaint.exe... then, I paste the image and save it to disk (too bad
    the last two steps are manually done!!!)
    The limited documentation on System Exec says it has a Standard Input
    terminal... but, I haven't figured out how to programmatically send CTRL-V
    or ALT-E to the MSPAINT application as command inputs...
    Any further ideas?
    Bill
    Jimmy Brain wrote in message
    news:[email protected]..
    > Thanks Labviewguru, but those examples deal with copying text to/from
    > clipboard.
    > There was an example from a shareware program, but it does not allow
    > to save the image. The links to register it at the his website
    are
    > dead also.
    >
    > Nobody here has ever had the need to copy programmaticaly an image in
    > the clipboard and save it to disk?
    >
    > I know that IMAQ Vision can do it, but I do not have that.
    >
    > PS: I found this OCX ( http://www.simtel.net/pub/pd/57740.html ) on
    > the web that does this, but I haven't been able to get it to work from
    > inside LabVIEW. The Visual Basic example works, but I can't seem to
    > replicate the call to this OCX in LabVIEW.
    > I am mostly trying to learn on my own, that is why I want to much to
    > solve this.
    >
    > Thanks in advance for any help out there. I have become frustrated
    > with this little problem. I know someone might have an easy answer,
    > but I haven't found it yet. Thanks!!!! :-)
    > /JB
    > LabVIEW 6.1

  • How to save images from Photoshop to Lightroom 5.4?

    I edit images in Photoshop CC, save and I don't see the images in Lightroom. This started happening when I upgraded to version 5.4. I've glanced at other threads that spoke to the same issue and I've tried all of the suggestions to no avail. Any help would be appreciated.

    Don't know if this is because I am using IMAP to connect to gmail so it doesn't really see them (but seems to work with other pictures emailed to me) or whether it is due to the iPhone 'embedding' the images rather than attaching them?
    Photos sent as true attachments to the message are not embedded with the iPhone's Mail client. Photos sent as true attachments are displayed inline or viewed in place within the body of the message, which is not the same as being embedded.
    Doing this with an email client on your computer, there should be nothing special or different with the photos emailed by your iPhone with your Gmail account. I regularly send photos with my MobileMe account from my iPhone, and I can save the photos sent with my MobileMe account from the account's server stored Sent mailbox with the Mail.app on my Mac. I haven't tried to save all photos sent from every sent message in my account's Sent mailbox in bulk, but the photos are sent as true attachments to the message.

  • Nikon D800 raw files taken with Sandisk extreme plus 32GB SDHC card got corrupted. Able to preview them in Lightroom4.4 Library, but not able to import or transfer the files from card to computer. Any ideas on how to save images from Library Window in Lig

    Hi, I have shot few pictures on 31st December night in RAW mode using Nikon D800 and Sandisk extreme plus 32GB SDHC card. It looks like card got some memory errors so not able to transfer the files from Card to computer. However I am able to view the pics thru Lightroom ver 4.4 Library, but when I tried to import them, it gives me an error stating that file can't be read.
    Is there a way to save the pics from Library window in lightroom overcoming the card read errors ?
    Thanks in advance

    Hi SSPRENGEL,
    Thank you for your response. Here is the error message I am receiving, I tried with various destination folders in the computer but it still gives the same error:. Just to let you know, I am able to import pictures into these folders from other memory cards.
    I am able to finally at least extract the jpgs using the option suggested by elie-d

  • How to save image catch from USB camera to database ?

    Hi guys.
    I needed help on IMAQdx tools. But i dont know how to save image that catch from USB camera to database.

    So you can acquire the image OK?
    And you want to save it to a SQL database?
    See here:
    http://zone.ni.com/devzone/cda/epd/p/id/5210

  • I am unable to save images from google! Tried turning I-pad off then back on, no avail!

    I need help. I am unable to download/save images from google. I did turn off my I-pad and restart it. Still the same! What next?

    How are you trying?
    Are the images copyrighted and blocked from download?

  • Write permission error message when I try to 'save image' from elements 12 raw camera to main editing section?

    I get a 'write permission error' message when I try to 'save image' from Raw Camera sector to the main editing section of Elements 12. How can I overcome this problem?

    Well, first of all Save Image doesn't have anything to do with moving a raw file into the regular editor. That's the DNG converter. Evidently you are trying to create a dng file in a place where you don't have permission to write. Take a look at the location and change it to someplace where you can write. An example would be opening a file that's on a disc and trying to save back to that disc.
    But you should still be clicking the Open button instead of the Save Image button if you want to do anything other than make a DNG file.

  • How to save picture from an iPad on someone else computer

    how to save picture from an iPad on someone else computer.

    Why don't you save pictures to Dropbox?
    You don't have to save it on someone's computer
    http://i1224.photobucket.com/albums/ee374/Diavonex/b90c9d4d.jpg

  • How to copy images from another MC in reversed order??

    Hi everyone,
    I'm new to AS3 and have been fighting and searching for a solution to this problem for a week now, and I'm VERY close!
    I crated a MC holding of a series of images (about 50) and I jump around in it using plenty AS3 scripts (most of which I don't fully understand yet, but I'm working on that to! )
    I had to find a way to "rewind" (= play backwards) the MC. Since there is a stop(); command in almost every frame, prevFrame does not work and if I put that in a loop, it goes WAY to fast (but worked).. So I could think of only one way...
    Create a new (reverserd) MC with the same image sequence ald reverse it manually and play that one.
    This all works fine (very proud of it ).
    Now my question:
    To get this to work for multiple image sequences, I have to load all images twice (once in MC_1 and again in MC_2 and select them and reverse them).
    Not a big one, unless you want to create MANY of those SWF's...
    Is it possible to load the 50 images of the first MC in reverse into the second MC dynamically? JUST the images, noting else.
    extra info: the MC_2 is already in the lib(empty) and placed on the stage.
    something like:
    var pointer:Number=1;
    for (var:i:Number=50;i>=0;i--) {
    get MC_1.picure(var);
    put it in MC_2.frame(pointer);
    pointer = pointer + 1;
    All help is welcome and please take into account that I have little experience and copy most of my scripting from people like you
    T.I.A.
    Melluw

    I tried your advice (thanks for that)
    The event I already have is the mouse leave
    I //-d out the part I removed (what did work)
    The code I ended up with is:
    function Start() {
    stage.addEventListener(Event.MOUSE_LEAVE, cursorHide);
    function cursorHide(evt:Event):void {
    var currFrame = MC_1.currentFrame;
    if (CCW == true) {  //it is true in this case
      movStart = (50 - currFrame);
    else {
      movStart = currFrame;
    if (movStart>25) {
      MC_1.prevFrame();
    // removed swapChildren(MC_1, MC_2); // This is the part I removed
    // removed MC_2.gotoAndPlay(movStart);
    else {
      MC_1.gotoAndPlay (movStart);
    And if I leave the stage on the part where movStart is indeed >25
    Nothing happens,
    So I guess this is not what you meant
    Subject: Action Script 3 how to copy images from another MC in reversed order??
    I cannot direct you in the loading of the images approach, it will be too complicated, and will probably not work anyways... when you move away from a frame that has dynamic content, you lose the content.  So basically, there is nothing practical in taking that approach.
    I do niot understand what the problem will be with the enterFrame/prevFrame approach. If everything you can do with the mouse is already used (which I doubt) by the first mc, then there is nothing else you can do with this file.  You probably just need to rethink your control scheme.  You should search Google for "AS3 slideshow tutorial", and to lighten up your design, add "XML" in that search.
    >

  • How to save pics from facebook in nokia lumia 625

    I am using Nokia Lumia 625
    please tell me how to save pics from Facebook
    while using thanks 

    Sure it does;
    Select (TAP) the post you  like to save;
    Then TAP AND HOLD to select the save option
    Click on the blue Star Icon below if my advice has helped you or press the 'Accept As Solution' link if I solved your problem..
    Attachments:
    tap1.png ‏502 KB
    tap2.png ‏284 KB

  • How to load images from css file in JavaFX 8

    I have this css file which loads images in JavaFX 8 application:
    #pill-left {
        -fx-padding: 5;
         -fx-border-image-source: url("/com/dx57dc/images/left-btn.png");
        -fx-border-image-slice: 4 4 4 4 fill;
        -fx-border-image-width: 4 4 4 4;
        -fx-border-image-insets: 0;
        -fx-border-image-repeat: stretch;
         -fx-background-color: null !important;
    #pill-left:selected { -fx-border-image-source: url("/com/dx57dc/images/left-btn-selected.png"); }
    #pill-left .label {
        -fx-text-fill: #d3d3d3;
        -fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.75) , 0, 0.0 , 0 , -1 );
    #pill-left:selected .label {
        /* -fx-text-fill: black; */
        -fx-text-fill: white;
        -fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 );
    #pill-center {
        -fx-padding: 5;
         -fx-border-image-source: url("/com/dx57dc/images/center-btn.png");
        -fx-border-image-slice: 4 4 4 4 fill;
        -fx-border-image-width: 4 4 4 4;
        -fx-border-image-insets: 0;
        -fx-border-image-repeat: stretch;
         -fx-background-color: null !important;
    #pill-center:selected { -fx-border-image-source: url("/com/dx57dc/images/center-btn-selected.png"); }
    #pill-center .label {
        -fx-text-fill: #d3d3d3;
         -fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.75) , 0, 0.0 , 0 , -1 );
    #pill-center:selected .label {
        -fx-text-fill: black;
        -fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 );
    #pill-right {
        -fx-padding: 5;
        -fx-border-image-source: url("/com/dx57dc/images/right-btn.png");
        -fx-border-image-slice: 4 4 4 4 fill;
        -fx-border-image-width: 4 4 4 4;
        -fx-border-image-insets: 0;
         -fx-border-image-repeat: stretch;
        -fx-background-color: null !important;
    #pill-right:selected { -fx-border-image-source: url("/com/dx57dc/images/right-btn-selected.png"); }
    #pill-right .label {
         -fx-text-fill: #d3d3d3;
        -fx-effect: dropshadow( one-pass-box , rgba(0,0,0,0.75) , 0, 0.0 , 0 , -1 );
    #pill-right:selected .label {
        -fx-text-fill: black;
        -fx-effect: dropshadow( one-pass-box , white , 0, 0.0 , 0 , 1 );
    The images are located at the Java package com.dx57dc.images
    In Java 7_25 this code works as expected but in JavaFX 8 b99 I get this error:
    ava.lang.NullPointerException
    at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1129)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:1598)
    at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1520)
    at com.sun.javafx.sg.prism.NGGroup.renderChildren(NGGroup.java:233)
    at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:199)
    at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1249)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:1598)
    at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1520)
    at com.sun.javafx.sg.prism.NGGroup.renderChildren(NGGroup.java:233)
    at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:199)
    at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:1249)
    at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:1598)
    at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1520)
    at com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:99)
    at com.sun.javafx.tk.quantum.AbstractPainter.paintImpl(AbstractPainter.java:210)
    at com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:95)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
    at com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:129)
    at java.lang.Thread.run(Thread.java:724)
    D3D Vram Pool: 13,331,480 used (5.0%), 13,331,480 managed (5.0%), 268,435,456 total
    20 total resources being managed
    4 permanent resources (20.0%)
    1 resources locked (5.0%)
    7 resources contain interesting data (35.0%)
    0 resources disappeared (0.0%)
    D3D Vram Pool: 13,331,480 used (5.0%), 13,331,480 managed (5.0%), 268,435,456 total
    20 total resources being managed
    4 permanent resources (20.0%)
    1 resources locked (5.0%)
    7 resources contain interesting data (35.0%)
    0 resources disappeared (0.0%)
    D3D Vram Pool: 13,331,480 used (5.0%), 13,331,480 managed (5.0%), 268,435,456 total
    20 total resources being managed
    4 permanent resources (20.0%)
    1 resources locked (5.0%)
    7 resources contain interesting data (35.0%)
    0 resources disappeared (0.0%)
    What is the proper way to load images from css in Java 8?
    Ref
    How to load images from css file in JavaFX 8 - Stack Overflow

    There is nothing special to do - you execute the statement from your program just like any other SQL statement.  The only thing to be aware of are the privilege/permission issues:
    When loading from a file on a client computer:
    READ CLIENT FILE privilege is also required for the database user.
    Read privileges are required on the directory being read from.
    The allow_read_client_file database option must be enabled.
    The read_client_file secure feature must be enabled.
    Revoking these privileges is also the only way you can prevent a user from executing the statement.

  • Any ideas of how to receive images from a wireless camera (2.4 ghz) to my ipad rather than the handheld DVR supplied?

    Any ideas of how to receive images from a wireless camera (2.4 ghz) to my ipad rather than the handheld DVR supplied?

    some of those often have webserver so one just navigate to it using a browser

Maybe you are looking for

  • Error in raising an event

    Hello friends                 I have 2 iViews in a Page. The first iView consists of a variable for a query and the second iView is nested in a tabstrip. The second iView consists of 2 tabs with each consisting of a BW query. Both the queries share t

  • Setup needed for ACH payments to the Employee and Supplier

    Hi, I am looking for a document to know the setup steps needed for ACH payment to the Employees and the Suppliers. Can anybody give me a detailed document on that or let me know where I will find one? Thanks, Arun Edited by: 834011 on Feb 4, 2011 3:5

  • Why customer exit variable to grab the current month value doesn't work?

    In CMOD, input the following code to grab the current month value from the system date: Grab the month value with System Date WHEN 'CURMONTH'.     CLEAR l_s_range.     l_s_range-low = SY-DATUM+4(2).     l_s_range-sign = 'I'.     l_s_range-opt = 'EQ'.

  • File size on export

    I need to know the file size that will be generated when exporting jpegs for web use, as certain sites have restrictions. This is a fairly basic function and is available in Elements. I currently have to guess a quality setting, export the jpeg, chec

  • My newly-installed TB disappeared from my Windows 8.1 64bit laptop. How can I prevent this happening again?

    When I installed the new TB "portable" a few minutes ago, all seemed to be going well. I downloaded an accumulation of messages from my server and began setting up archive folders and filters. Suddenly, TB froze and then disappeared! When I clicked o