1

Given that an input string is a valid Base64 string (png). How can the image width and height be calculated? Is there a formula I can use?

For example, I want to know if this image is an 100x100 image.

I already found a solution using System.Drawing, but this is not part of .net core.

Rand Random
  • 7,300
  • 10
  • 40
  • 88
Gybelle
  • 345
  • 1
  • 3
  • 11
  • If you like to you can give this a try https://www.nuget.org/packages/System.Drawing.Common/ - or this https://blogs.msdn.microsoft.com/dotnet/2017/01/19/net-core-image-processing/ – Rand Random May 03 '18 at 13:12
  • 1
    You could use the preview of [`System.Drawing`](https://www.nuget.org/packages/System.Drawing.Common) or probably better to use a cross platform library like [ImageSharp](https://www.nuget.org/packages/SixLabors.ImageSharp/) which is what the .Net team were recommending. – DavidG May 03 '18 at 13:13

0 Answers0