How to resize bitmap image to be <200 KB and meet Tile restrictions (WinRT)

后端 未结 2 1459
南笙
南笙 2021-01-15 08:39

I am developing a routine to scale some bitmap images to be part of tile notifications for my Window-8 app

The tile images must be <200KB and less than 1024x1024

2条回答
  •  无人共我
    2021-01-15 09:27

    Can you not calculate it using width x height x colourDepth (where colourDepth is in bytes, so 32bit=4bytes). Presumably you're maintaining aspect ratio so you just need to scale down width/height until you find it less than 200KB.

    This assumes the output is an a bitmap and therefore uncompressed.

提交回复
热议问题