This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 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 |