I had the same issue error loading .png in Xamarin forms (android). The same trick fixed the issue by renaming the png as .jpg and changing the code accordingly to point to jpg instead of png.
<Image HeightRequest="200" WidthRequest="200" Source="logo.jpg"/>
That said I don't think the problem is that file format was incorrect, something is probably wrong elsewhere. For example I had created the png file using MS Paint and pasted the image into it. It should be correct png file and it does open fine in picture editors as well as visual studio.
Weird solution.
p.s
When you rename the png, you will need to delete the existing png resource from project, rename the file in explorer and add the resource again in (Visual Studio 2019) project.