Windows 8 Application instance: Create GIF animation under WINRT (flipflop)

Source: Internet
Author: User
Tags new features

An interesting application, called Flipflop, was downloaded from the Windows Store (http://apps.microsoft.com/windows/app/flipflop/99c01512-fe4f-4d1a- 872E-EB9FD6638FF4, which allows the user to create page-flip animation effects (FlipBook Animation), and can export animations to GIF files. See a technical article about the project on MSDN and share it with you.

Flipflop project, the author uses the Windows Imaging Component (WIC) implementation to create a picture (MSDN view the Windows 8 WIC new features),

Referencing the Windows.graphics namespace in your project contains the Bitmapencoder class (MSDN), which enables you to create specific picture encodings, such as Gifencoder.

The Code view tool lets you see the author create a shared class "Gifmaker" to implement the definition of animation frames,

Using System;
Using System.Collections.Generic;
Using System.Runtime.InteropServices.WindowsRuntime;
Using Windows.foundation;
Using Windows.Graphics.Imaging;
Using Windows.storage;
    
Namespace Utilities
{public
    sealed class Gifmaker {readonly list<byte[]> frames
        = new list< Byte[]> ();
        Private readonly uint Framewidth;
        Private readonly uint Frameheight;
    
        Public Gifmaker (uint width, uint height)
        {
            framewidth = width;
            frameheight = height;
        }
    
        public void Appendnewframe ([readonlyarray]byte[] frame)
        {
            frames. ADD (frame);
        

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.