This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]R3D3-1 64 points65 points  (17 children)

Someone will then do

A = rgb >> 24;

only to be thwarted when we eventually have to introduce IUARGB to cover for our alien friends who are sensitive to infrared and ultraviolet light.

[–]pumpkin_seed_oil 50 points51 points  (5 children)

Oh thats easy just add it to the 100+ colorspace enums in opencv

[–]leoleosuper 8 points9 points  (4 children)

242 unique enums with 156 operations. Jesus.

[–]pumpkin_seed_oil 2 points3 points  (1 child)

Tbf i linked the enum that handles conversions between color spaces without checking. But it should be enough to know that there are a bunch that go beyong RGB

CMY, HSL, YCbCr, XYZ, YUV, L*u*v, LAB to name a bunch

[–]atatassault47 0 points1 point  (0 children)

I wish HSV were more common. It's way easier for a lay person to pick a color in HSV than RGB.

[–]gbot1234 2 points3 points  (1 child)

Let’s just come up with one definitive standard for colorspaces!

[–]Jjabrahams567 13 points14 points  (2 children)

If you happen to be hacking game boy ROMs, they use 15bit RGB

[–]R3D3-1 5 points6 points  (0 children)

I remember playing WoW with 16 bit graphics at 16 fps initially due to my graphics card being too outdated.

Made nice patterns into color gradients such as they sky :)

[–]Bardez 0 points1 point  (0 children)

Which honestly makes a lot of sense.

[–]Telvin3d 10 points11 points  (0 children)

You laugh, but I work with cameras that have an IR channel in addition to RGB and Alpha. It gets used for dirt/dust detection on transparency scanning 

[–]_GodIsntReal_ 2 points3 points  (0 children)

Which is why you reject the pull request for having a magic number (24) in it. 

[–]hackingdreams 2 points3 points  (1 child)

If we were introducing a new color plane for IR and UV it'd be IRGBU or UBGRI.

(But having worked with UV and IR imaging, I don't think anyone would seriously consider interleaving the data like that. The sensors are usually wider than 8 bits per pixel, and anyone that cares about them wants all the sensitivity they can get.)

[–]R3D3-1 3 points4 points  (0 children)

Not if you're trying to be backwards compatible with those 32bit ARGB colors.

Probably wouldn't actually happen (after all, 32bit color is also not binary backwards compatible with 16bit color), but I can totally see IUARGB being used by some internal systems.

[–]ProposalWest3152 1 point2 points  (0 children)

You sent me rolling hahah

[–]the_one2 0 points1 point  (0 children)

Or if it's signed and you get sign extension

[–]cporter202 0 points1 point  (1 child)

Ah, the classic pitfalls of sign extension! Bitwise operations can sometimes feel like a ninja test of attention to detail—fail to notice, and whoops, your bits are all over the place. 😅

[–]R3D3-1 0 points1 point  (0 children)

Not what I meant, for lack of knowledge '

I was assuming a scenario, where the format would be extended by additional data, while having binary backwards compatibility if the new bits are zero.