I isolated it down to just pulling a texture from the content pipeline. Just the act of copying the data from the texture is enough to kill it. In fact, I don't even need to manipulate any pixels at all. My code works fine in Windows (I'm sounding like a broken record) but not with Android. I, on the other hand, after loading the C64Font png, need to iterate over the pixels and set the designated pixel colour as transparent. In your case, via emulation, and in my case, with my phone physically attached with USB.īut the part missing from loading a texture in this way, is that with the MG Content Pipeline, you get to choose a transparent colour, and it will automatically turn that colour within the PNG to transparent. We both can confirm that the images appear on an Android. Perhaps move the following to another thread, if you can confirm the issue?Īs we've discovered, we can indeed load a PNG file using a byte as source. However, I do have a genuine problem with Texture2D. Download icons in all formats or edit them for your designs. These free images are pixel perfect to fit your design and available in both PNG and vector. Get free Android logo icons in iOS, Material, Windows and other design styles for web, mobile, and graphic design projects. It certainly feels like it's leaning towards bad data in the source - but I can't explain how that could be the case. Download 31175 free Android logo Icons in All design styles. Given the project posted definitely didn't work, and they should all be valid PNG files in the source. I'm hesitant to want to say we should close this ticket, given the issues I had. Yet here I am proving to myself, as you also have - that the image can load into a Texture2D. It's likely I didn't keep the original, and instead over-written it, which might explain why my data is different.īut I wouldn't have opened a ticket if I hadn't already struggled for a few evenings trying to get my code working.Īgain, shared code - that works in an MG Windows deskop project, but not on Android. The byte of 1881 bytes doesn't match any of my revious attempts that I've saved. What's killing me now, is what happens from that point.īefore I go into that, I'll just say that I dont understand why I've got different data than yesterday. The byte from my sprite loading routine is an exact match to the byte extracted from the Android Asset. Is there a better way to extract error information? All I could do to get this, was to wrap the failing code in a try/catch block, because all the output to the output window says is System.InvalidOperationException: This image format is not supportedĬalling it a night, I think. Using (var mem = new MemoryStream(rawPng)) System.InvalidOperationException: This image format is not supported occurred I'm using MonoGame 3.7.1.189 (NuGet package). Issue 651 sounds like the same problem, but that ticket was closed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |