Skip to content

Instantly share code, notes, and snippets.

View redwarp's full-sized avatar
💭
Dreaming of electric sheep

Benoît Vermont redwarp

💭
Dreaming of electric sheep
View GitHub Profile
@ChevyRay
ChevyRay / qoi.rs
Created November 24, 2021 22:49
QOI - Quote OK Image Format (Rust Port)
const INDEX: u8 = 0x0;
const RUN_8: u8 = 0x40;
const RUN_16: u8 = 0x60;
const DIFF_8: u8 = 0x80;
const DIFF_16: u8 = 0xc0;
const DIFF_24: u8 = 0xe0;
const COLOR: u8 = 0xf0;
const MASK_2: u8 = 0xc0;
const MASK_3: u8 = 0xe0;
@st235
st235 / BitmapExts.kt
Last active November 17, 2021 06:33
Fast Blur implementation
package st235.com.github.picassotransformer
import android.graphics.Bitmap
import androidx.annotation.IntRange
import androidx.annotation.Px
fun Bitmap?.blur(
@IntRange(from = 1L) @Px radius: Int,
@IntRange(from = 1L) downscale: Int
): Bitmap? {
@ksm
ksm / UINavigationController+Fade.h
Created February 14, 2012 22:23
UINavigationController custom pop/push transition animation
/*
Copied and pasted from David Hamrick's blog:
Source: http://www.davidhamrick.com/2011/12/31/Changing-the-UINavigationController-animation-style.html
*/
@interface UINavigationController (Fade)
- (void)pushFadeViewController:(UIViewController *)viewController;
- (void)fadePopViewController;