Skip to main content
7 votes
Accepted

Why replicating the higher bits of RGB565 when converting to RGBA8888?

Without replicating the bits the LSBs will be 0, so for the maximum value of 0x1f (max for 5 bits) it would expand to 0xf8 when converted to 8 bit. What you want is 0xff so the range of 0x00->0x1f ...
PaulHK's user avatar
  • 2,322
7 votes

Why replicating the higher bits of RGB565 when converting to RGBA8888?

There's actually a reasonably good mathematical reason for doing bit replication: First note that the n-bit string, $N$, actually represents the value $\frac{N}{2^n-1}$ and we want to produce the m-...
Simon F's user avatar
  • 4,296
3 votes
Accepted

Estimating real world object distance from photo

I may be misunderstanding what you're asking, but if you know the sensor size and the number of pixels in the object, then you can calculate the object size. For example, a Canon 7D has an APS-C ...
user1118321's user avatar
  • 3,421
3 votes

Estimating real world object distance from photo

Yes, theoretically, for the sphere no for other things in image. If it is possible to augment the situation then it is possible to measure anything you can track much more reliably. First, knowing the ...
joojaa's user avatar
  • 8,437
2 votes
Accepted

How do (Direct3D) precision conversions for floats work?

Rounding is all about what happens to the data in the higher precision format that don't exist in the lower precision one. For example, 0.7 cannot exactly be represented as an 8-bit unsigned, ...
Nicol Bolas's user avatar
  • 9,842
1 vote
Accepted

What are the exact math steps to convert sRGB (D65) to Lab (D50) colorspace?

convert sRGB to RGB by first removing gamma (colors must be in linear color space for the conversions to be accurate) The Fujiwaratko site is confusing since it lists sRGB in its table but the ...
pmw1234's user avatar
  • 3,229
1 vote

Convert a .X mesh to a modern format

Perhaps Assimp will work for you? In particular, it has a command line tool for converting between formats.
joe_chip's user avatar
  • 237
1 vote

Convert a .X mesh to a modern format

Blender appears to have a .X importer. It's a plugin that ships with Blender, but is disabled by default, so you have to enable it in User Preferences. See: https://blender.stackexchange.com/a/8749/...
emackey's user avatar
  • 369

Only top scored, non community-wiki answers of a minimum length are eligible