简体   繁体   中英

Little endian bitmaps & “Unable to create GMSGLImageTile due to bad graphics data”

I'm not sure what exactly is going on, but I'm attempting to render radar tiles over a Google Maps map and am receiving the following messages:

  • ((null)) was false: Unable to create GMSGLImageTile due to bad graphics data
  • ((null)) was false: Don't support little endian bitmaps

Is there an easy way to convert a UIImage to a big endian or is there something I need to know about using / subclassing GMSSyncTileLayer ?

The images I'm trying to render as tiles are png images.

That error will occur if your PNG images for your tiles are not set to 8-bit color depth.

Changing the color depth of your images to 8-bits should fix the problem.

If it's only the big-little endian problem, yes. Did you get the bitmap by NSDate or is it possible to create one? If so, convert it to a bytes array then swap the bits.

*Edited

Me and the other guys have made some answers here: https://stackoverflow.com/a/33051250/1900120

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM