I would like to resize a picture to a specific file size. For example, no more than 200KB. What is the best approach to achieve this with C# .NET ?
Thanks !
If you think about it, you aren't going to know the filesize of the image until after it's resized. So you've either got to perform a successive iteration of attempts and compare the file sizes afterwards or you could change your constraints to restrict images to a particular set of height and width dimensions.
1.4m articles
1.4m replys
5 comments
57.0k users