Saving a BitmapImage/Image to a file.

How can I do
System.Drawing.Image myImage = new System.Drawing.Image();
myImage.Save("c:\\image.gif", System.Drawing.Imaging.ImageFormat.Gif);
with a
Windows.UI.Xaml.Media.Imaging.BitmapImage
object?
Mediocre Access 2010 | (Baby) Beginner C Sharp | OK at Active Directory (2012) | Fragmented understanding of DNS/DHCP | Laughable experience with Group Policy | Expert question asker on MSDN Forums

You cannot extract the pixels from a BitmapImage. You need to either get the data from the original that you created the BitmapImage from or you can use a WriteableBitmap which exposes its PixelBuffer.
Once you have the WriteableBitmap's PixelBuffer you can encode it to a GIF file with a BitmapEncoder. See
How to save WriteableBitmap to image file in Windows store apps for a sample.

Similar Messages

  • Saved a few images to Dashboard. How can I get them out of there and save them to a file? Thanks

    Saved a few images to Dashboard. How can I get them out of there and saved to a file? Thanks

    I'm sorry, I'm lost & don't even know what to ask.
    Oh wait, open Dashboard in Applications, do the Pics show there?
    http://techland.time.com/2013/01/22/the-slow-but-almost-certain-demise-of-apples -os-x-dashboard/

  • Saving an image and data file

    Am am current developing a program similar to the one below using an elvis module.
    I am trying to save am image of the graph but, the save image window keeps popping up because of the loop.
    I just want to be able to click a button and then save the image to a file without the save window popping up every time. 
    Attachments:
    conor.vi ‏57 KB

    Hi cdwyer,
    In your second example's block diagram, you need to have the save button terminal and the associated case structure within your main loop, otherwise the button/case structure is only read/executed the one time.
    An additional tip: When saving "computer graphics", like LabVIEW panels or diagrams, it's nearly always better to save them using the PNG format. PNG format is both compressed (small file sizes) and yet also "lossless compression" (no image degradation) - also it's usually preferable to use true colour (24 bit colour depth).
    JPEG file type is a "lossy" type of compression that is designed for photographics - it will cause blurring and colour distortions when used with computer graphics.
    Mark.
    P.S. Worth a few star ratings?
    Message Edited by Mark H on 02-02-2006 12:11 PM
    Attachments:
    example2 modified.vi ‏72 KB

  • Problem Saving Gererating GIF Image

    Hello, we are having a problem in production environment when try to right mouse and select Print on an mii grid. Works just fine in all of our non-production environments. Checked the System Security pull downs and they all matched non-prod. Was not sure which one to compare, was not a ImageStorageServlet on pull down menu.
    After right mouse and select Print on grid, get:
    -Java Applet Window popup message - Problem Saving Gererating GIF Image
    -Then - blank browser page - .../XMII/ImageStorageServlet/View/null
    - Non-production servers works fine produces grid on browser page - XMII/ImageStorageServlet/View/2084280301
    NetWeaver Log:
    Location - com.sap.xmii.servlet.ImageStorageServlet
    Full Message Text
    ImageStorage - Error saving GIF file 
    Full Message Text
    ImageStorage - Error generating GIF output
    Any help would be appreciated.
    Thanks

    David,
    Have you put in a support ticket for this? I recommend doing so since its occurring in your production environment. You should also attach your log files as well.
    Regards,
    Kevin

  • How do I add multiple images into one file?

    I'm sure this is something that's been covered in another post (or even in the help portal) but I think my wording in my search terms are not correct or... I don't know, because I just can't find what I'm looking for.
    I want to know how to add multiple images into one file/one image, both horizontally and/or vertically. To give you an idea of what I mean, check out :
    http://www.best10apps.com/apps/comic-story,531596060.html
    If you scroll down, you'll see a heading entitled : Screenshots of Comic Story. Notice how there's 3 pictures (divided by borders). 2 of those pictures are side by side, and 1 of them is below the first 2 pictures.
    I want to know how to add different pictures/images and put them into one picture.

    One way is to create template PSD files and populate them with your images using Photoshops scripts.
    Photo Collage Toolkit UPDATED June 12, added Picture Package Support via PasteImageRoll and BatchPicturePackage scripts.
    The package includes four simple rules to follow when making Photo Collage Template PSD files so they will be compatible with my Photoshop scripts.
    There are eleven scripts in this package they provide the following functions:
    TestCollageTemplate.jsx - Used to test a Photo Collage Template while you are making it with Photoshop.
    CollageTemplateBuilder.jsx - Can build Templates compatible with this toolkit's scripts.
    LayerToAlphaChan.jsx - Used to convert a Prototype Image Layer stack into a template document.
    InteractivePopulateCollage.jsx - Used to interactively populate Any Photo Collage template. Offers most user control inserting pictures and text.
    ReplaceCollageImage.jsx - use to replace a populated collage image Smart Object layer with an other image correctly resized and positioned.
    ChangeTextSize.jsx - This script can be used to change Image stamps text size when the size used by the populating did not work well.
    PopulateCollageTemplate.jsx - Used to Automatically populate a Photo Collage template and leave the populated copy open in Photoshop.
    BatchOneImageCollage.jsx - Used to Automatically Batch Populate Collage templates that only have one image inserted. The Collage or Image may be stamped with text.
    BatchMultiImageCollage.jsx - Used to Automatically Batch Populate Any Photo Collage template with images in a source image folder. Easier to use than the interactive script. Saved collages can be tweaked.
    BatchPicturePackage.jsx - Used to Automatically Batch Populate Any Photo Collage template with an image in a source image folder
    PasteImageRoll.jsx - Paste Images into a document to be print on roll paper.
    Documentation and Examples

  • Why I can no longer save edited images as jpeg file in CS6?

    When the save dialog box appears, under Save Options and next to Layers there is a yellow triangle with an exclamation mark showing the Layers are not saved. My images are 72 dpi, I have changed screen resolution and no result.I have the image set to RGB colors and 8 bits/channel. Anybody else has experienced this?(It saves it fine in psd, though).Help!!

    Ok, you need to know what you want to do with your image. For example if it's for the web the best way to save to jpg is..  File-Save for Web, then you will see a Box with four pages,,  you can choose: Original which is going to be your original image,... Optimized which is a Lower quality version. 2-Up and 4-Up.
    when you click on 4-Up Tab you see your original image in the top left, Also you have your image in 3 different windows with different file size and speed. You can click on each window and inside the Preset in Top right choose JPEG. and you can change the quality from Low to High or Drag the Quality Slider for different quality.
    NOTE: when you do File-Save For Web,, you are going to have a flatten Image.. you will loose your Layers.
    It is always better if you shoot your images In higher Res, such as 240, or 300 dpi, and later Down-sample the image to a lower quality for the web. If you have the original image at Higher Res, First you should Go to Image Image-size For Example Height 1200 Pixel. If you go ahead and save the file for the web then you don't need to change the Resolution. don't forget to Sharpen your image when you Down-sample

  • How to store images as disk files rather than in iphoto db

    Is there a way to make iPhoto maintain the images as disk files, rather than import them into iphotos massive database file. I would prefer to use iphoto to just store a link to the photo, rather than the photo itself. That way I can work with the image in photoshop or whatnot without having to jerk around with the iPhoto database/

    Welcome to the Apple Discussions. No need to find a workaround. You can use Photoshop from inside iPhoto.
    Using Photoshop (or Photoshop Elements) as Your Editor of Choice in iPhoto.
    1 - select Photoshop as your editor of choice in iPhoto's General Preference Section's under the "Edit photo:" menu.
    2 - double click on the thumbnail in iPhoto to open it in Photoshop. When you're finished editing click on the Save button. If you immediately get the JPEG Options window make your selection (Baseline standard seems to be the most compatible jpeg format) and click on the OK button. Your done.
    3 - however, if you get the navigation window that indicates that PS wants to save it as a PS formatted file. You'll need to either select JPEG from the menu and save (top image) or click on the desktop in the Navigation window (bottom image) and save it to the desktop for importing as a new photo.
    This method will let iPhoto know that the photo has been editied and will update the thumbnail file to reflect the edit..
    NOTE: With Photoshop Elements 6 the Saving File preferences should be configured: "On First Save: Save Over Current File". Also I suggest the Maximize PSD File Compatabilty be set to Always.
    If you want to use both iPhoto's editing mode and PS without having to go back and forth to the Preference pane, once you've selected PS as your editor of choice, reset the Preferences back to "Open in main window". That will let you either edit in iPhoto (double click on the thumbnail) or in PS (Control-click on the thumbnail and seledt "Edit in external editor" in the Contextual menu). This way you get the best of both worlds
    2 - double click on the thumbnail in iPhoto to open it in Photoshop. When you're finished editing click on the Save button. If you immediately get the JPEG Options window make your selection (Baseline standard seems to be the most compatible jpeg format) and click on the OK button. Your done.
    3 - however, if you get the navigation window that indicates that PS wants to save it as a PS formatted file. You'll need to either select JPEG from the menu and save (top image) or click on the desktop in the Navigation window (bottom image) and save it to the desktop for importing as a new photo.
    This method will let iPhoto know that the photo has been editied and will update the thumbnail file to reflect the edit..
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.≤br>
    Note: There now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard.

  • Stop images from losing file size when scaled down?

    Ive read this tutorial;
    http://joedasilva.com/blog/?p=32
    and ive just found out that if you scale an image smaller,
    the file size is permanently decreased, and enlarging the image
    again will make it pixalated. If im working with images and I want
    a lot of freedom to play around with the scaling, do I need to
    convert them all to grafics?
    Is there a setting I can change so that the images are saved
    at the display resolution when I export them, but maintain there
    full file size when in the document? Is this how illustrator works?
    thanks

    quote:
    Originally posted by:
    jdldn
    Ive read this tutorial;
    http://joedasilva.com/blog/?p=32
    and ive just found out that if you scale an image smaller,
    the file size is permanently decreased, and enlarging the image
    again will make it pixalated. If im working with images and I want
    a lot of freedom to play around with the scaling, do I need to
    convert them all to grafics?
    Is there a setting I can change so that the images are saved
    at the display resolution when I export them, but maintain there
    full file size when in the document? Is this how illustrator works?
    thanks
    There is no such a thing as a "grafic." In your Fireworks
    document, you can have bitmap objects and vector objects. Bitmap
    objects, such a photographs, are rectangular objects with detailed
    information, where the color and transparency of each pixel is
    specified. Vector objects are mathematical objects, where the shape
    is determined by nodes and the color is determined by the fill
    type. You cannot convert a bitmap object to a vector object
    (although you can sometimes create a vector illustration that
    resembles a photograph).
    If you are still experimenting with your design, what you can
    do is add a layer with your original-sized bitmap objects. Put this
    layer at the bottom of your stack and keep it hidden. Then, anytime
    you feel a need to refresh an object that you've resized too many
    times, copy that object from your originals layer. It may not be a
    perfect solution, but it should help you.
    I've never had a problem with multiply resizing photos,
    myself, because I design my layouts with vector shapes first. Once
    I have all my proportions set,
    then I add any photos I have. With this worflow, I know what
    size to make my photos. Of course, I might change my mind, later,
    but my process keeps me on track.

  • Does flash save images to temporary files?

    Hi guys
    I am just wondering, if my flash application loads an image
    dynamically at one stage of the movie and then the user comes back
    to that image later on, will flash actually download the image
    again or will it use a saved copy in the temporary internet files?
    If it does not do this automatically, does anyone know any
    good ways to do this?
    Thanks
    Shane

    If the image is being loaded from an external source using
    load or loadMovie
    then yes, it will be cached. If the image is embedded in the
    Flash movie,
    no cache.
    Dan (Mode) Smith
    --> Adobe Community Expert
    *Flash Helps*
    http://www.smithmediafusion.com/blog/?cat=11
    *THE online Radio*
    http://www.tornadostream.com
    <--check this
    ***Stop Piracy
    http://www.adobe.com/aboutadobe/antipiracy/***
    "s83g1000" <[email protected]> wrote in
    message
    news:f8n2jk$qvk$[email protected]..
    > Hi guys
    >
    > I am just wondering, if my flash application loads an
    image dynamically at
    > one
    > stage of the movie and then the user comes back to that
    image later on,
    > will
    > flash actually download the image again or will it use a
    saved copy in the
    > temporary internet files?
    >
    > If it does not do this automatically, does anyone know
    any good ways to do
    > this?
    >
    > Thanks
    > Shane
    >

  • Saving as Disc Image hangs/freezes and must force quit to exit

    Hi,
    I've always been able to Save as Disc Image in order to make multiple copies. Now, it runs fine all the way until it gets to "Burn - Current Operation: Writing" where it freezes indefinitely. The beachball turns so I eventually have to force-quit.
    I have tried going to the .plist file as suggested in this forum, restarting my computer, but it doesn't work. The film is 25 minutes long, so I've also tried both Best Quality and Best Performance, with encoding checked and without encoding checked.
    I have also completely re-created the project from scratch after removing the .plist file, but it still hangs each time after "Processing Movies" is finished and right when "Burn" begins.
    This does not happen when I burn the iDVD project directly to an inserted disc. Only when saving as disc image.
    This never happened before... any suggestions out there?
    Thank you,
    Lisette

    FYI, After you asked me how much free space my hard drive had, I freed up some space and had about 38 gb left and tried to burn disc as image again. This time it worked!
    So I think you were on to something there, and that must have been the problem - not enough space on my hard drive.
    Thank you!!
    -Lisette

  • Reformatting images with .ppt file extensions (Powerpoint)

    Morning everyone,
    A friend of mine sent an image file to me that was in the .ppt (Powerpoint) format. I know that I can easily view the image file via a slide show presentation using Quick Look. There are several images in the file that I would like to save to my computer and Print. Is there any way to reformat the file or an image contained in the file to a JPEG format so that I may save it in my Pictures folder?
    Any help would be much appreciated.
    Thanks for reading my post.
    joe

    Ira, just checking in on this thread to say I ran into a similar problem with a user. He has Office 2007, and has several ppt that were created with Office 2003 saved on a thumb drive. He took it to a presentation room with Office 2010 installed, and several
    of the older 2003 ppt would crash Power Point, but not all of them. They all seemed to open fine using Office 2007 though. I helped him save all his 2003 ppt files to 2007 pptx files using his 2007 version of Office, and now they open fine in either 2007 or
    2010 on any machine. We are close to moving all our users away from Office 2003, so this seemed like the easiest way to resolve it, although I still consider it a work around.

  • Save image to a file got a blank image.

    I need to save graphics image of a component to a file. Following is what I did.
    1. Call createImage() from this component.
    2. Convert the image to a BufferedImage.
    3. Call ImageIO.write() to save it in a file.
    What I got from the result file is all blank. Following is the code.
    Please help. Thanks a lot!
    import java.io.*;
    import java.awt.*;
    import java.awt.image.*;
    import javax.imageio.*;
    import javax.swing.*;
    public class SaveLabelImage
         String jpg_out = "image.jpg";
         String dir_name = "c:\\temp\\";
         SaveLabelImage()
              // Use a label to display some text
              JFrame frame = new JFrame();
              JLabel label = new JLabel( "ABCDEFG", JLabel.CENTER );
              Container contentPane = frame.getContentPane();
              contentPane.add( label, BorderLayout.CENTER );
              frame.setSize( 300, 150 );
              frame.setVisible(true);
              File f_dir = new File( dir_name );
              if ( !f_dir.exists() ) f_dir.mkdir();          
              write_label( label, jpg_out );
    public void write_label( JLabel label, String out_fn )
              // Save the image to a file
              int w = label.getWidth();
              int h = label.getHeight();
              Image im = (Image)label.createImage( w, h );
              BufferedImage bimage = new BufferedImage( w, h, BufferedImage.TYPE_INT_RGB );     
              Graphics2D g2 = bimage.createGraphics();     
              g2.drawImage( im, null, null );                                             
              if ( bimage == null ) {
                   System.out.println( "Buffered Image is null!" );
                   return;
              try
                   String fn = dir_name + jpg_out;
                   File file = new File( fn );
    ImageIO.write( bimage, "jpg", file );          
                   System.out.println( "Image of Jlabel is saved in file " + fn );
              catch (IOException e) {;    }
         }     //write_label
         public static void main(String arg[])
              new SaveLabelImage() ;               
    }     // class SaveLabelImage

    I am able to get a good image file now. Thanks you very much.
    However I still have a few quesions.
    1. In my case, the label is visible on the screen, why I need to call the setVisible(true) again?
    2. Why use print() instead of paint()?
    3. I have to use BufferedImage.TYPE_INT_ARGB to create a new BufferedImage, otherwise the result image file is in black.
    4. I did not use the hints because it is very confusing. Fortunately, It worked without them.
    Following is a modified version of your code.
    import java.io.*;
    import java.awt.*;
    import java.util.*;
    import java.awt.image.*;
    import javax.imageio.*;
    import javax.swing.*;
    public class SaveComponentAsImage
    public static void saveComponentAsImage(
                             JComponent c,
                             int w, int h, int image_type,
                             String fn, String file_type )
              c.setSize(w, h);
    c.setVisible(true);
    c.validate();
    // use TYPE_INT_ARGB if you want alpha (transparency)
    BufferedImage image = new BufferedImage( w, h, image_type );
    Graphics g = image.getGraphics();
    // draw the graphics
    c.print(g);
    g.drawLine(0,0, c.getWidth(),c.getHeight());
    // write it out
    try {
    ImageIO.write(image, file_type, new File(fn));
    System.out.println( "Image is saved in file " + fn );
    } catch (IOException ioe) {
    System.out.println(ioe.getMessage());
    // cleanup
    g.dispose();
         public static void main(String arg[])
              JLabel l = new JLabel( "ABCDEFG", JLabel.CENTER );
              int w = l.getWidth();
              int h = l.getHeight();
              System.out.println( "label width=" + w );
              System.out.println( "label height=" + h );
              if ( w == 0 || h == 0 )
                   w = l.getPreferredSize().width;
                   h = l.getPreferredSize().height;
              System.out.println( "Preffered width=" + w );
              System.out.println( "Preffered height=" + h );          
              w +=100;
              h +=50;          
              String fn = "myImage.png";
              int image_type = BufferedImage.TYPE_INT_RGB;          
              saveComponentAsImage( (JComponent)l, w, h, image_type, fn, "png" ) ;     
              image_type = BufferedImage.TYPE_INT_ARGB;     
              fn = "myImage_ARGB.png";                                   
              saveComponentAsImage( (JComponent)l, w, h, image_type, fn, "png" ) ;     
    }

  • Disk Image Password and File Questions

    Hi, I created a sparse disk image to protect some files and included the password in my keychain.  Can I reverse this decision?  Also, if I delete the files in the sparse disk image, are the files deleted totally from my iMac, or are they just no longer encrypted and password protected?  Thanks.

    Thanks a lot, now when I open the image a password is requested which I prefer.  Still, I've saved my Turbo Tax file in the image, but I'm able to open TT without supplying the password, shouldn't I be prompted for the password since it's in a password protected disk image?  Unfortunately TT no longer protects files on a computer, a user is supposed to create an Intuit account to save the tax file password online. What a hassle.

  • Saved over a very important indesign file!!

    saved over a very important indesign file that has synced to the creative cloud is there any way i can revert back to a previous version on my cloud?

    You should be able to use the Restore functionality to revert back.
    In a web browser go to the Files page at https://creative.adobe.com/files.
    Find the file and go to it's page by clicking on it.
    In the Activity list to the right of the image you should see earlier versions listed.
    Select the version you want and click the Restore link.
    Confirm the restore by clicking the blue Restore button in the dialog that pops up.

  • How can I see preview images of STN files in CS4?

    I save many of my art files as STN (Genuine Fractals) files so I can print on demand at various sizes. I used to be able to see tiny preview images of these files; now, using CS4 32-bit or 64-bit with Windows 7 64-bit OS, all I see in my STN folder is little blank page icons - no images. I have descriptive filenames, but still - it would REALLY help to be able to quickly scan the images for the one I want to open in PhotoShop. I used to be able to see these preview STN images. Help??

    Theoretically, to see Sting format (.stn) thumbnails, you'd have to get a codec from the OnOne software people and install it into Windows Explorer as a shell extension.  This has nothing to do with Photoshop.
    I know of no such codec available, at least not for .x64 systems (64 bit Explorer).  I haven't seen .stn thumbnails for a long time, and I currently have their Perfect Resize 7 product.
    But it seems to me that a long ago when I used a 32 bit OS there was a time that I could see .stn thumbnails.  Perhaps they once provided a 32 bit codec with their product, or I had a 3rd party codec that understood the format.
    It would be a great question to pose to OnOne Software.  If you do, please report back here what they say.
    -Noel

Maybe you are looking for