Skip to content

Instantly share code, notes, and snippets.

View SheffieldKevin's full-sized avatar

Kevin Meaney SheffieldKevin

View GitHub Profile
@SheffieldKevin
SheffieldKevin / compareimages.swift
Last active February 26, 2023 18:33
A couple of swift functions for comparing two CGImage using CIImage in OS X
/**
@brief Returns true if images have same meta. Width, Height, bit depth.
@discussion Assumes images are non null.
*/
func doImagesHaveSameMeta(#image1:CGImage, #image2:CGImage) -> Bool {
if CGImageGetWidth(image1) != CGImageGetWidth(image2) {
return false
}
if CGImageGetHeight(image1) != CGImageGetHeight(image2) {
@SheffieldKevin
SheffieldKevin / MICMSampleBuffer.h
Last active January 18, 2024 10:14
Video Sample buffer accessor/iterator using AVFoundation
// MICMSampleBuffer.h
// MovieMaker
//
// Created by Kevin Meaney on 02/01/2015.
// Copyright (c) 2015 MIT License. All rights reserved.
@import Foundation;
@import AVFoundation;
@interface MICMSampleBuffer : NSObject <NSCopying>
@SheffieldKevin
SheffieldKevin / main.m
Created February 20, 2015 11:20
bigears. Drawing rotated and positioned text within a path using CoreText (OS X command line, intended to be bug report for apple but highlighted a bug of mine)
//
// main.m
// bigears
//
// Created by Kevin Meaney on 18/02/2015.
// Copyright (c) 2015 Kevin Meaney. All rights reserved.
//
#import <Foundation/Foundation.h>
@SheffieldKevin
SheffieldKevin / MIAVCreateImageOfCompositionMap.m
Created March 8, 2015 19:22
This is a hack grab of code from Apple's AV Composition Debug Viewer application to generate a CGImage. Works on OS X and iOS. Doesn't draw text.
//
// MIAVCreateImageOfCompositionMap.m
// MovingImagesFramework
//
// Created by Kevin Meaney on 08/03/2015.
//
// Lifted from Apple's Composition Debug Viewer application.
@import Foundation;
@import AVFoundation;

Keybase proof

I hereby claim:

  • I am SheffieldKevin on github.
  • I am ktam (https://keybase.io/ktam) on keybase.
  • I have a public key whose fingerprint is D09A 1368 02CD 66C0 454C 42A8 595C 9934 19FB CBF9

To claim this, I am signing this object: