last day (25 days later) » 

Rob
Rob
16:38
You said: If I view the memory in Xcode, I get this dropbox.com/s/ngqm9t9m19697fs/…
Yes, that's just the hex representation of what you have in your JSON. It definitely is a BMP. But perhaps it was truncated for some reason. Hard to say without seeing the actual file. Does the size of the BMP file correspond to the number of numbers in the image array in the JSON?
Are you able to share the actual BMP file you generated? Or is it proprietary?
But glancing at the JSON raw data (confirmed looking at your hex representation), this is definitely a BMP. It's just hard to tell whether it was corrupted somehow (i.e. truncated) or whether it's just a BMP format that iOS doesn't support.
The fact that you saved it as a file with BMP extension and still can't see it in any of your Mac tools suggests that there's something fundamentally wrong with the file.
I could share the BMP
its just test data.
Rob
Rob
But the start of the BMP looks well formed.
Standard Windows BMP, methinks.
lol, cannot upload here, it says invalid image
Rob
Rob
:)
Rob
Rob
16:50
Put it on dropbox or something like that.
REMOVEMEADDHttps://dl.dropboxusercontent.com/u/2396540/tmp.bmp
its in dropbox, but the chat is trying to translate it
Rob
Rob
FYI, if you care about the BMP spec, wikipedia has decent intro: en.wikipedia.org/wiki/BMP_file_format
did that work?
Rob
Rob
Yeah, trying to grab it now.
No, I didn't get the same thing as shown by your hex representation above. Hmm.
Maybe dropbox is being too clever, by half.
That's what it looked like when I opened it up in a hex editor. And that doesn't match your original JSON, nor your hex dump.
Sigh.
Either change the extension (e.g. dat), or see if you can diagnose it yourself.
But if you're not opening up the BMP at all, the file is likely corrupted.
Does the length of the file look reasonable?
I don't really know, All I was given was what was on the docs page in the original question
Rob
Rob
16:56
Does the length of the file correspond to the number of numbers in your JSON array?
I am trying to get ahold of their support to get more info
yea its 244
Rob
Rob
Wow, that's surprisingly small. Is it supposed to be a tiny image of just a few pixels?
I hadn't noticed that your JSON was that short.
If I'm interpreting the BMP header properly, the image is supposed to be 165x45. The resulting BMP should be much larger, I would have thought. Definitely a conversation to have with the API guys. Or maybe bad source image on the server.
then I think my test data might be bad
I am just going to have to shake more info out of them
Rob
Rob
And as others have pointed out, if there is a server problem, rather than fixing it, they really should just base64-encode the thing, rather than this horribly inefficient format. But I understand that might not be an option.
where are you getting the 164x45
Rob
Rob
17:04
If I'm reading that BMP spec right, the first 14 bytes is the file header.
The next 40 bytes is the DIB header.
So, starting at offset 14 (decimal), you see a 28 hex, which means the DIB is 40 bytes.
well thanks for the help, I am going to talk to their Rep... I will update the question once I get the info.
Rob
Rob
Anyway, first four bytes starting at 14 is the DIB size, the next four bytes is the width, and the next four is the height (hex A5 and 2D respectively, which decimal 164 x 45).
Good luck.

  last day (25 days later) »