Click here to Skip to main content
15,881,803 members
Articles / Formating
Tip/Trick

Windows Phone Apps Tips - Image Considerations

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
16 May 2013CPOL2 min read 10.1K   2   2
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)



Comments and Discussions

 
GeneralMy vote of 5 Pin
rajeev bhatia16-May-13 0:45
rajeev bhatia16-May-13 0:45 
GeneralRe: My vote of 5 Pin
Shweta Lodha16-May-13 4:29
Shweta Lodha16-May-13 4:29 

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

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