Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 1719 [details]
An indexed PNG we recolor at runtime.
In order to get at the palette for an indexed PNG image, I need access to CGColorSpaceGetColorTable. More information on what I'm trying to do here: http://stackoverflow.com/questions/10220240/how-do-i-modify-the-palette-of-an-indexed-png-at-runtime-on-ios. This is for an established image recoloring system used for a game I'm working on porting to iOS.
Thanks for your report - and the image!
The missing call was already added in 264efaacfc958b863ed98e2b49f166b8ec7e76ed and you can see the pinvoke declaration from github .
I'll be adding a new test case (to our internal test suite) that use your image as it will be better than the "API roundtrip" we presently have.
$ file tests/monotouch-test/behind_back.png
tests/monotouch-test/behind_back.png: PNG image data, 100 x 1280, 8-bit colormap, non-interlaced
^ even if indexed it turns out UIImage and CGImage.FromPng both returns RGB images. It seems it's the case when an alpha channel is present (according to the comments on the stackoverflow link I provided on my answer to your question).
I'll try to find another one, maybe from http://www.schaik.com/pngsuite/ to cover this case properly (even if our tests are probably ok as-is).
Still thank you for the image and filling the issue :-)