Giter VIP home page Giter VIP logo

dbcamera's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dbcamera's Issues

Orientation: landscape

The library has some problems with this kind of orientation. Could you fix it please? :(

iPad camera size

Hi, I'm having trouble using the camera on iPad. The size of the camera is quite small, how can I put it in full screen?

Thanks

Angelo

How to determine if photo 'used' was new photo or existing from photo library?

I want to save new photos taken and selected to be 'used' to the camera roll. However, if a photo is selected from the camera roll and 'used', I don't want to save a duplicate.
Is there a way to pass an identifier to the method '- (void)captureImageDidFinish:(UIImage *)image withMetadata:(NSDictionary *)metadata'
(or does it exist already in meta data?) that can identify the image as new or pulled from library?

Metadata support

Should be a few lines of extra code. You should send the metadata too, along with the UIImage.

Any instructions on how to link the camera to photos (camera roll)?

I am using your camera library to take pictures and process them to a server. But I would like to be able to load in the existing photos on an iphone. I ran your example app and gave authorization to access photos, but still doesn't load anything when i click on the 'preview' button. Any suggestions?

Drag and drop difficult to use

When I drag and drop in the cropping interface it frequently bounces back to the original position.

This effect is particularly noticeable when trying to drag to the borders of the image.

Automatic square images

Great work so far.
When taking a picture only a square frame is visible suggesting the resulting image will be inside that box. But when taking the picture it is actually outside those boundaries. I would like to see an option to return the image with how it is presented in that box.
Is that hard to implement?

Regards

Add more image editing features

Just wondering if there are any plans to implement more image editing features than just a basic crop?

If there are and you are open to pull requests I've been working on a forked version of this repo that replaces the DBCameraSegueViewController with this project: CLImageEditor as it provides a lot of great image editing tools without changing the basic flow of this project.

DBCamera should make it possible to hide buttons in default interface

Right now DBCamera's interface is very hardcoded. Or else you need to build the whole interface from scratch with a custom camera.

I think it would be really clean if the DBCameraView exposed its closeButton, gridButton etc properties, so we can just hide them (set .hidden = YES) if we want, keeping the rest of the features.

Attention: There are no images in your Library.

When I click photo album icon at right bottom, console says:

2014-06-12 16:26:47.170 DBCamera[519:55778] Attempt to add read-only file at path file:///var/mobile/Media/PhotoData/Photos.sqlite?readonly_shm=1 read/write. Adding it read-only instead. This will be a hard error in the future; you must specify the NSReadOnlyPersistentStoreOption.

and the application says:

Attention: There are no images in your Library.

What can be the problem ?

Note: I'm using iOS 8

segue controller detection

When the delegate method is called which processes the image, is there any way to detect if the photo was selected via the segue controller or captured by camera

preview Layer

The image in the previewlayer doesn't seem to match the output image.
Do you have suggestions on how I can make the output image match the previewlayer (i.e. cropping before it reaches delegate method)?

Change default 'flash' icon

Hi @danielebogo

I received some good feedback from my team about dbcamera. Overall, very positive. They mentioned that they intuitively thought that the camera flash icon, would turn a flashlight on and off, not the camera flash. I agree with their feedback - there has been a ton of user training around using the lightning bolt icon to represent a camera flash.

Can we change default flash icon to a lightning bolt style icon?

Crop to a specified aspect ratio

Thanks for the addition of cropping to a square. Can this functionality be generalized so that photos can be cropped to an arbitrary aspect ratio (as opposed to 1:1)?

Video Recorder && Picking feature ?

Hi again @danielebogo ,

I don't want to use another library for video recording and picking from album.

I only want to use your awesome UI.

When will you think to add these features to your library sir ?

If it is not a close time, I have to look another classes sadly.

How can we open the photo picker directly ?

Hi,

I love your UI design, so I want to use it for another purpose,

In my application there is 2 buttons, one is "take a photo" , another is "pick a photo".

I'm using DBCamera for "take a photo" with photo picker icon at right bottom.

But I want to use your photo picker UI as well as in "pick a photo" action.

So, how can I open your photo picker UI directly ? I mean without opening camera first.

missing: #import <GPUImage/GPUImage.h>

The compiler is complaining that GPUImage is not installed. I am trying to run example.
Was this intentional? Do we have to download GPUImage ourselves or was it a mistake that you didn't include it?

Crop function

Hi,

I think you need to force the crop mode to have a minimum scale and a minimum rect area.

Here's a pictures discribing what should not be done by a user in a crop mode :
img_1650

iOS 6 Screen bounds

Hey! I have some problems of screen bounds with DBCamera on iOS 6.
To fix, I've added these lines on DBCameraView.m:

  • (DBCameraView *) initWithCaptureSession:(AVCaptureSession *)captureSession
    {
    CGRect rect;
    if ([[[UIDevice currentDevice] systemVersion] floatValue] <= 6.1)
    {
    rect = CGRectMake( 0.0f, -20.0f, [[UIScreen mainScreen] bounds].size.width, (([UIScreen mainScreen].bounds.size.height ) - 50 ));
    } else {
    rect = [[UIScreen mainScreen] bounds];
    }

    return [[self alloc] initWithFrame:rect captureSession:captureSession];
    }

captureImageDidFinish not being called / Use Photo button not working

I am trying to use this library, and everything works great except when I try to use the image. The delegate method is never called. Tapping the 'Use Photo' button/text after taking a picture never does anything. The button doesn't even change color like the crop and retake buttons do (i.e. doesn't highlight). Any suggestions?

I implemented the code directly from the instructions:
HomeViewController.h:

import "DBCameraViewController.h"

import "DBCameraContainer.h"

@interface HomeViewController : UIViewController

HomeViewController.m:

pragma mark - DBCameraViewControllerDelegate

  • (void)displayCamera
    {
    UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:[[DBCameraContainer alloc] initWithDelegate:self]];
    [nav setNavigationBarHidden:YES];
    [self presentViewController:nav animated:YES completion:nil];
    }
  • (void)captureImageDidFinish:(UIImage *)image
    {
    NSLog(@"Photo selected!");//Test for delegate method being called
    [self.imageView setImage:image];
    [self.presentedViewController dismissViewControllerAnimated:YES completion:nil];

}

Add support for multiple photo albums

Right now only images from the Camera Roll are loaded. It would be great if we could also find images from other Albums. Having the ability to first browse an Album then select an image would be great.

Add DBCamera without cocoapods.

Hi,
I'm facing some problem installing DBCamera with cocoapods.How can i add it to my project without cocoapods?

Thanks
Lorenzo.

Segue not intuitive

ios simulator screen shot 22 jun 2014 11 54 39
The segue is not intuitive. I would change "Retake" with the arrow back. This makes also sense if we want to add editing features, because we will have more space and it will be intuitive in this way

Tint icons and labels

The white icons look great, but I wish I could tint them and the labels to meet my app's standard colors. Is it in the future plans?

missing: #import <GPUImage/GPUImage.h>

The compiler is complaining that GPUImage is not installed. I am trying to run example.
Was this intentional? Do we have to download GPUImage ourselves or was it a mistake that you didn't include it?

Received memory warning

Hi, whenever I choose a photo there's memory warning issue.
What could be the problem here?
Thanks.

inside tabbarcontroller - issues with frame

  1. I'm using your camera with a custom UI and without a container.
  2. I'm putting the DBcameraViewController as the designated tabbarcontroller.
  3. The idea is for the tabbar to be shown at the bottom whilst the camera control is shown above it.

Unfortunately, the camera control attempts to be full screen, so the tabbar is shown AND a portion of the camera is underneath it.

Is there anyway to fix that?

Custom resolution

Awesome lib!
Would love it if there was a setting to specify an output/working image resolution for when full quality isn't necessary. See snapchat for example, they work with a really low resolution all the way and it makes the app really snappy.

Focus point BUG

When you click on the preview layer, it shows the focus circle perfectly.

However if you drag your finger around, the circle drags around, BUT there is an offset so it's not perfectly under your finger.

Library Manager crash - NSInvalidArgumentException

Getting this crash quite often with some test users.

Thread : Fatal Exception: NSInvalidArgumentException
3 TestApp 0x00000001000cf238 __36-[DBLibraryManager assetsEnumerator]_block_invoke (DBLibraryManager.m:117)

I don't have exact repro steps yet but it happens on Line 117 of DBLibraryManager.m.

looking at Apple docs,
"- (ALAssetRepresentation *)defaultRepresentation
Return Value
An asset representation object for the default representation.

Discussion
This method returns nil for assets from a shared photo stream that are not yet available locally. If the asset becomes available in the future, an ALAssetsLibraryChangedNotification notification is posted."

My guess is that it's probably happening to a photo stream photo not available locally when picked from library and therefore causing the nil argument crash.

adding a nil guard might be a quick fix?
if([result defaultRepresentation]){
[items addObject:[[result defaultRepresentation] url]];
assetResult = result;
}

Container

This is not an issue.

I was just wondering why you separated the container from the camera view. What are the merits of doing so?

Focus point

If the user taps the screen to focus, is there any way to get the focus x,y position in relation to the actual image.
say image ends up being 100x100.

If user touches mid point, is there a way to get the point (50,50) in the delegate method where I process the image?

Turkish Localization

/*
DBCamera.strings
DBCamera

Created by iBo on 11/02/14.
Copyright (c) 2014 PSSD - Daniele Bogo. All rights reserved.
*/

"button.use" = "Kullan";
"button.retake" = "Tekrar Çek";

"general.error.title" = "Uyarı";
"general.button.cancel" = "İptal";

"pickerimage.nopolicy" = "Fotoğraflara erişim izni verilmemiş. Lütfen telefon Ayarlarından > Gizlilik > Fotoğraf bölümüne gidip uygulamamıza izin verip tekrar deneyin.";
"pickerimage.nophoto" = "Albümde fotoğraf bulunamadı.";

"pagecontrol.text" = "%i / %i (sağa/sola kaydırın)";

"cropmode.title" = "Kırpma Oranı";
"cropmode.square" = "Kare";

How to call DBCameraCollectionControllerDelegate in my view controller?

When I perform a click on a photo in collection view, I want to call a delegate in my controller to process anything at here before go to crop/filter screen. Can I do this?
For more specific, I find out in file DBCameraCollectionViewController.m, a delegate of collection view "collectionView:didSelectItemAtIndexPath", can I call my delegate function at here?

The captureImageDidFinish:withMetadata: not called

I followed your code in my project:

DBCameraContainerViewController *cameraContainer = [[DBCameraContainerViewController alloc] initWithDelegate:self cameraSettingsBlock:^(DBCameraView *cameraView, DBCameraContainerViewController *container) {
    [cameraView.photoLibraryButton setHidden:YES];
    DBCameraGridView *cameraGridView = [[DBCameraGridView alloc] initWithFrame:cameraView.previewLayer.frame];
    [cameraGridView setNumberOfColumns:4];
    [cameraGridView setNumberOfRows:4];
    [cameraGridView setAlpha:0];
    [container.cameraViewController setCameraGridView:cameraGridView];
}];

[cameraContainer setTintColor:[UIColor redColor]];
[cameraContainer setSelectedTintColor:[UIColor yellowColor]];

UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:cameraContainer];
[nav setNavigationBarHidden:YES];
[cameraContainer setFullScreenMode];
[self presentViewController:nav animated:YES completion:nil];

Cropping

I want to be able to crop by swiping my finger across the image.
The initial point will represent top-left corner of rectangle.
The final point of swipe will represent the bottom-right corner of rectangle.
I will crop out all other areas.

What is the best way to do that in your code?
What functions should I use to perform the cropping etc?

Force crop

I'd like to implement DBCamera on my app, but I require square pictures. Is there a way to force the user to use the crop function?

Portuguese localization

(I know I should make a pull request for this, but I'm not familiar with localizations on Xcode and I'm afraid I will mess it up.)

I've translated the strings to Portuguese (pt-br)

/* 
  DBCamera.strings
  DBCamera

  Created by iBo on 11/02/14.
  Translated by Guilherme Araújo on 29/05/14
  Copyright (c) 2014 PSSD - Daniele Bogo. All rights reserved.
*/

"button.use" = "Usar foto";
"button.retake" = "Repetir";

"general.error.title" = "Atenção";
"pickerimage.nopolicy" = "Por favor, habilite as permissões para poder acessar sua Biblioteca de Fotos. Verifique suas permissões em Ajustes > Privacidade > Fotos";
"pickerimage.nophoto" = "Não há nenhuma imagem na sua biblioteca";

"pagecontrol.text" = "%i de %i";

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.