Click here to Skip to main content
15,888,301 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: old code Pin
MikeTheFid11-Mar-22 4:46
MikeTheFid11-Mar-22 4:46 
GeneralRe: old code Pin
Baxter P11-Mar-22 5:08
professionalBaxter P11-Mar-22 5:08 
GeneralRe: old code Pin
Alan Pengelly11-Mar-22 5:28
Alan Pengelly11-Mar-22 5:28 
GeneralRe: old code Pin
kmoorevs11-Mar-22 9:04
kmoorevs11-Mar-22 9:04 
GeneralRe: old code Pin
Gary R. Wheeler11-Mar-22 10:14
Gary R. Wheeler11-Mar-22 10:14 
GeneralRe: old code Pin
englebart11-Mar-22 10:59
professionalenglebart11-Mar-22 10:59 
GeneralRe: old code Pin
Kirk 1038982111-Mar-22 9:21
Kirk 1038982111-Mar-22 9:21 
GeneralRe: old code Pin
honey the codewitch11-Mar-22 11:19
mvahoney the codewitch11-Mar-22 11:19 
The most complicated solution I've written was something that allowed you to define a pixel as a series of "channels", each with a name, resolution/bit depth, default value, and min and max value (related to the bit depth but can be overridden)

The pixels could then be accessed by individual channel name, or channel index. In addition, you could set the entire value (all channels) as a unit. A pixel could be as large as the machine's maximum word size.

Furthermore, to convert to other color models, all you have to do is make it convertible to a pixel with R, G, and B channels and it will figure out the rest.

All of this is done at compile time if the information is available at compile time. Even manipulating the individual channels does not yield shift instructions except if the values aren't known at compile time. It simply creates a new constant value.

It's pretty crazy.
To err is human. Fortune favors the monsters.

GeneralJust installed VS2022 and ... Pin
OriginalGriff10-Mar-22 1:18
mveOriginalGriff10-Mar-22 1:18 
GeneralRe: Just installed VS2022 and ... Pin
Richard Deeming10-Mar-22 1:28
mveRichard Deeming10-Mar-22 1:28 
GeneralRe: Just installed VS2022 and ... Pin
Slacker00710-Mar-22 1:36
professionalSlacker00710-Mar-22 1:36 
GeneralRe: Just installed VS2022 and ... Pin
den2k8810-Mar-22 2:34
professionalden2k8810-Mar-22 2:34 
GeneralRe: Just installed VS2022 and ... Pin
lmoelleb10-Mar-22 2:38
lmoelleb10-Mar-22 2:38 
GeneralRe: Just installed VS2022 and ... Pin
Slacker00710-Mar-22 1:34
professionalSlacker00710-Mar-22 1:34 
GeneralRe: Just installed VS2022 and ... Pin
Marc Clifton10-Mar-22 2:42
mvaMarc Clifton10-Mar-22 2:42 
GeneralRe: Just installed VS2022 and ... Pin
Dan Neely10-Mar-22 3:19
Dan Neely10-Mar-22 3:19 
GeneralRe: Just installed VS2022 and ... Pin
lmoelleb10-Mar-22 3:54
lmoelleb10-Mar-22 3:54 
GeneralRe: Just installed VS2022 and ... Pin
Dan Neely10-Mar-22 8:19
Dan Neely10-Mar-22 8:19 
GeneralRe: Just installed VS2022 and ... Pin
megaadam10-Mar-22 3:40
professionalmegaadam10-Mar-22 3:40 
GeneralRe: Just installed VS2022 and ... Pin
PIEBALDconsult10-Mar-22 4:36
mvePIEBALDconsult10-Mar-22 4:36 
GeneralRe: Just installed VS2022 and ... Pin
Andreas Mertens10-Mar-22 4:59
professionalAndreas Mertens10-Mar-22 4:59 
GeneralRe: Just installed VS2022 and ... Pin
Dan Neely10-Mar-22 8:30
Dan Neely10-Mar-22 8:30 
GeneralRe: Just installed VS2022 and ... Pin
Dan Neely10-Mar-22 10:44
Dan Neely10-Mar-22 10:44 
GeneralRe: Just installed VS2022 and ... Pin
DaveAuld10-Mar-22 6:52
professionalDaveAuld10-Mar-22 6:52 
GeneralRe: Just installed VS2022 and ... Pin
Southmountain10-Mar-22 8:08
Southmountain10-Mar-22 8:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.