• This repository has been archived on 30/Mar/2022
  • Stars
    star
    516
  • Rank 85,726 (Top 2 %)
  • Language
    C++
  • Created almost 12 years ago
  • Updated almost 10 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Fully customizable UIImagePicker replacement with flexible cropping, filters, perspective correction, rotation etc.

WARNING - CONSIDER THIS CODEBASE DEPRECATED. TAKE A LOOK AT: IPDFCameraViewController

MAImagePickerController aka. InstaOverlay

MAImagePickerController is a critical component of the InstaPDF (http://instapdf.me) for iPhone app. I've started to code in Objective C a couple of months ago, so please offer your insights into making the component better.

Credits:

Be sure to checkout the ToDo!

ToDo

  1. Improve Paper (Edge) Detection
  2. Fix rotation of UIImages chosen from the Library
  3. Store the rotations in the final view
  4. Improve API

Screenshots

Camera Viewer

Cropping View

Final/Adjusting View

Using it in your project

  1. Add all the necessary files inside MAImagePicker to your Project
  2. #import "MAImagePickerController.h" in your ViewController's header (.h) file & declare that it can be delegated by MAImagePickerControllerDelegate
  3. IMPORTANT: This project uses the OpenCV framework. Download the newest version here: 'http://opencv.org/'
  4. Double check all the necessary frameworks: 'CoreImage.framework', 'opencv2.framework', 'QuartzCore.framework', 'ImageIO.framework', 'CoreMedia.framework', 'AVFoundation.framework', MediaPlayer.framework
  5. The API is rather simple, use it like this:
- (IBAction)initButton:(id)sender
{
    MAImagePickerController *imagePicker = [[MAImagePickerController alloc] init];
   
    [imagePicker setDelegate:self];
    [imagePicker setSourceType:MAImagePickerControllerSourceTypeCamera];
    
    UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:imagePicker];
    
    [self presentViewController:navigationController animated:YES completion:nil];
}

- (void)imagePickerDidCancel
{
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)imagePickerDidChooseImageWithPath:(NSString *)path
{
    [self dismissViewControllerAnimated:YES completion:nil];
    
    if ([[NSFileManager defaultManager] fileExistsAtPath:path])
    {
        NSLog(@"File Found at %@", path);
        
    }
    else
    {
        NSLog(@"No File Found at %@", path);
    }
    
    [[NSFileManager defaultManager] removeItemAtPath:path error:nil];
}

License

Copyright (c) 2012-2013 Maximilian Mackh

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

Hacker-News-for-iOS

Hacker News client for iPad and iPhone [DEPRECATED]
Objective-C
588
star
2

KEYPullDownMenu

A pull down menu, similar to notification center on iOS that supports an unlimited number of items. Items can either be selected, deleted or reordered. The control is aimed at providing context for switching data within the same view controller.
Objective-C
262
star
3

BaseComponents

BaseComponents aims to provide easily reusable and understandable components to increase productivity with UIKit and Foundation APIs
Swift
141
star
4

Catalyst-Helpers

Unlock missing UIKit functionality with these AppKit helpers
Objective-C
107
star
5

PCRapidSelectionView

Interactive, beautiful & fast UIActionSheet replacement, supports continuous hold & select
Objective-C
67
star
6

Clear-Read-API

Extracts article text and metadata from a given URL
PHP
35
star
7

PCSplitView

Super powerful layout for iOS, simplified.
Objective-C
24
star
8

Editor

Custom UIKit Text Editor Component for Catalyst
Swift
16
star
9

Next-Airport

Open source RFML (RedFoundry.com) iPhone app
14
star
10

MStaff

3rd Party WhenIWork.com iOS Client app with multiple account support built for Hotel Marietta, Obertauern
Objective-C
6
star
11

Broadcast.io

Demo Node.js + iOS app that is entirly based on MessagesTableViewController & socket.IO-objc
Objective-C
6
star
12

wrrrite

Start writing, effortlessly & distraction free.
PHP
5
star
13

p-body

Static Blog + PHP + Markdown + CSS Formatting
PHP
4
star
14

Preview

Open Source replacement for RedFoundry Visualizer written in RFML
3
star
15

MMFatPipe

Image Resize + Asynchronous Upload
Objective-C
3
star
16

The-Queue

A ultra light-weight (& basic) Blogging engine: 57kb
PHP
2
star
17

InterfaceBuilder.swift-Demo

Swift
2
star
18

RFMLight

A proposition for a new RFML Format
JavaScript
1
star