Save writeablebitmap to file




















As the name indicates, the new SoftwareBitmap has a separate copy of the image data. Modifications to the SoftwareBitmap will not have any effect on the Direct3D surface. The SoftwareBitmap class provides the static method, Convert , that allows you to easily create a new SoftwareBitmap that uses the pixel format and alpha mode you specify from an existing SoftwareBitmap.

Note that the newly created bitmap has a separate copy of the image data. Modifications to the new bitmap will not affect the source bitmap. You can transcode an image file directly from a BitmapDecoder to a BitmapEncoder. Create a IRandomAccessStream from the file to be transcoded. Create a new BitmapDecoder from the input stream. CreateForTranscodingAsync , passing in the in-memory stream and the decoder object. Encode options are not supported when transcoding; instead you should use CreateAsync.

Any properties in the input image file that you do not specifically set on the encoder, will be written to the output file unchanged.

Call FlushAsync to cause the encoder to encode to the in-memory stream. Finally, seek the file stream and the in-memory stream to the beginning and call CopyAsync to write the in-memory stream out to the file stream.

Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. Is this page helpful? Please rate your experience Yes No. Any additional feedback? Submit and view feedback for This product This page. View all page feedback. In this article. Thanks mate! Good links, my 5 too! Sergey Alexandrovich Kryukov Oct pm. My 5, good link. Espen Harlinn Oct am.

Thank you, Sergey! Simon Bang Terkildsen Oct pm. Add your solution here. OK Paste as. Treat my content as plain text, not as HTML. Existing Members Sign in to your account.

This email is in use. Do you need your password? Submit your solution! When answering a question please: Read the question carefully. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem.

Insults are not welcome. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.

Let's work to help developers, not make them feel stupid. Related Questions. Net Bitmap. How do I convert writeablebitmap to matrix in C. The example program uses the following statements to save its image into six different files with various formats.

I think that for Windows is the best technology. C Helper. Skip to content. Add BitmapFrame. Create wbitmap ; encoder. Save filename, ImageFormats. Bmp ; break; case ". Gif ; break; case ".



0コメント

  • 1000 / 1000