Skip to content

Instantly share code, notes, and snippets.

View morizotter's full-sized avatar
😄
Good

Morita Naoki morizotter

😄
Good
View GitHub Profile
@morizotter
morizotter / UIImage+Trim.m
Created September 29, 2015 18:08 — forked from spinogrizz/UIImage+Trim.m
Trim transparent pixels around UIImage
- (UIImage *) imageByTrimmingTransparentPixels {
int rows = self.size.height;
int cols = self.size.width;
int bytesPerRow = cols*sizeof(uint8_t);
if ( rows < 2 || cols < 2 ) {
return self;
}
//allocate array to hold alpha channel
//
// FileUploader.swift
// ERAssistant
//
// Created by Narciso Cerezo Jiménez on 27/5/15.
// Copyright (c) 2015 Closure Software. All rights reserved.
//
import Foundation
import Alamofire