Skip to content

Instantly share code, notes, and snippets.

View andreberg's full-sized avatar
💭
I may be slow to respond.

André Berg andreberg

💭
I may be slow to respond.
View GitHub Profile
@andreberg
andreberg / sRGB Response Curve
Last active May 9, 2020 19:46
[sRGB Response Curve] Math formula for generating a sRGB standard response curve. #color #colorcorrection #colorprofile #standard
if (in <= 0.00304)
{
out = in*12.92;
}
else
{
out = (1.055 * pow(in, (1.0/2.4)) - 0.055);
}
@andreberg
andreberg / CDNumberDialingTextField.m
Last active May 9, 2020 19:45
[Number Dialing Text Field Widget] Cocoa widget which combines a number-formatted text field with a up/down arrow control for "dialing" the displayed number. #cocoa #widget #gui #objective_c
//
// CDNumberDialingTextField.m
// Countdown
//
// Created by Andre Berg on 20.03.10.
// Copyright 2010 Berg Media. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at