Click here to Skip to main content
Click here to Skip to main content

Windows Phone Apps Tips - Image Considerations

, 16 May 2013
Rate this:
Please Sign up or sign in to vote.
Some tips on Windows Phone Apps

Introduction

Images play a very significant role in any Windows Phone application. So, one should be very careful while dealing with images. As of now, Windows Phone supports only two image formats named JPG/JPEG and PNG. Before concluding on which image format to choose, let's get into bit more depth of it.

PNG format images are non-lossy and need very little CPU effort to display because those are pixel perfect. But at the same time, huge PNG images take too much longer to read from storage and ultimately lead to slower display. On the other hand, JPEG format images are lossy, smaller to store and based on the compression level much more complicated decoding algorithm is required to display them.

Another point regarding image is about opacity and transparency - All the images that use transparency should be stored as PNG format because JPEG doesn’t support transparency and JPEG format should be used for all the images that are fully opaque.

Now when coming to Windows Phone apps, performance matters a lot, isn’t it?

Well, now some of the best tips to make our Windows Phone app much more performant:

  • Choosing proper image format: Use JPEG for anything large and PNG for anything small, i.e. use PNG for small icons. If image transparency is not a concern, then it is always recommended to use JPEG.
  • Compiling images with Build Action=Content: Whenever a new image is added to the project, the default "Build Action" is set to Resource. It is always recommended to change this "Build Action" property to Content as it will reduce the size of our DLL, resulting in speedy image and app loading.
    Note: Resources are included in an assembly whereas content is included in deployment package.
  • Image size: One of the limitations of Windows Phone is the limited screen resolution. So one has to consider proper image size in order to gain better performance.

I'll keep updating this post as and when I'll get to know about more interesting facts. I would be very happy if you can add more to it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Shweta Lodha
Technical Lead
India India
You can also follow me at my blog http://www.shwetalodha.blogspot.in/
Follow on   Twitter

Comments and Discussions

 
GeneralMy vote of 5 Pinmemberrajeev bhatia16-May-13 0:45 
GeneralRe: My vote of 5 PinmemberShweta Lodha16-May-13 4:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 16 May 2013
Article Copyright 2013 by Shweta Lodha
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid