Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 860
Brian Weinreich Avatar asked Oct 20 '22 00:10

Brian Weinreich


2 Answers

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.

like image 95
Daniel Zhang Avatar answered Nov 15 '22 02:11

Daniel Zhang


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

like image 33
MatthewLuiHK Avatar answered Nov 15 '22 04:11

MatthewLuiHK