bevy / photo-editor Goto Github PK
View Code? Open in Web Editor NEWPhoto editor with a lot of cool features
License: MIT License
Photo editor with a lot of cool features
License: MIT License
Could someone try to provide a RN plugin for this?
Using the photo editor on the iPad, it will crash when trying to open the "constrain" alert sheet (in crop mode), because it does not have a barButtonItem or sourceRect/sourceView set.
Name: NSGenericException, Reason: Your application has presented a UIAlertController (<UIAlertController: 0x103ca6400>) of style UIAlertControllerStyleActionSheet. The modalPresentationStyle of a UIAlertController with this style is UIModalPresentationPopover. You must provide location information for this popover through the alert controller's popoverPresentationController. You must provide either a sourceView and sourceRect or a barButtonItem. If this information is not known when you present the alert controller, you may provide it in the UIPopoverPresentationControllerDelegate method -prepareForPopoverPresentation.
Can be fixed by setting the appropriate barButtonItem in CropViewController.swift, before present
is called (around line 239):
actionSheet.popoverPresentationController?.barButtonItem = sender
I downloaded your code then installed the dependency iOSPhotoEditor in teh directory and I get this error:
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1
I steer anything I should do to run the example Photo Editor app ?
please add code @objec(photoEditorDelegate)
When images are changed the scale aspect, image drawing doesnt work.
Why?
For the next update you guys should include a way to edit the font of text and the text's size similar to how you can change the color. Love the design!
I want to zoom the image and then edit it.
How can I do it?
there is older documents please update it.
this is not working
let photoEditor = UIStoryboard(name: "PhotoEditor", bundle: Bundle(for: PhotoEditorViewController.self)).instantiateViewController(withIdentifier: "PhotoEditorViewController") as! PhotoEditorViewController
When I am trying to install this pod it says "[!] Unable to find a specification for iOSPhotoEditor
"
Hello
Is it possible to define which elements in the top toolbar are shown and which are hidden ?
Hi, great library, It's possible implemented the Carthage ?
Hi,
Is there any way to add our custom icons in the Editor view? Like Crop, Save.. etc
I had some problems translating the photo-editor classes to swift 4
At the moment, when i draw in the image the lines fade and start to going up.
I added text and i want to change it's text color. Currently it is white color as default and i can not see any property mention for changing it to any other color.
I'm trying to use Carthage however get the following error:
Dependency "photo-editor" has no shared framework schemes for any of the platforms: iOS
This may be the fix: [https://stackoverflow.com/a/35111518/1933346]
for ios 11.4 there is 16 error for adding @objc for selectors functions.
I want to disable crop feature.
There is No option for undo and redo, now we can clear all drawings the same time but need undo and redo option...?
Is it possible to detect undo/redo?
Firstly thank you very much for this fantastic library to share.
Upload time is so long i'm showing spinner while it's uploading. but it is so boring.
min 7 - 8 max 12 second
if i take a picture without your library it just for one second..
Anything that i can to fix this situation ?
Hi, After save image, is this possible to edit some stickers like layer. is this possible?
I can't figure why, but if you draw on certain photos ( I just can't understand which is the criteria), the drawings become "wahsed away". The drawn lines fades away.
Is there a way to solve the problem?
If this is not the proper place to report this please advise.
Minor fix: in PhotoEditor+Controls.swift -> hideControls function hides the stickerButton for the .text case instead of what should be textButton.
Hello , eventtus
Thank's for this app is very beautiful , but when I change size and style font I can't do that
how can I change it :)
Thank's
this problem shows when starting Editor controller. :(
this class is not key value coding-compliant for the key colorView
if it is already there, i don't know how to implement. All my stickers are the same size no matter the dimensions of the source image.
Can add Mosaic function. thanks
Can I make the background of image transparent on touch any area?
PhotoEditor+Controls.swift line at 88
@IBAction func shareButtonTapped(_ sender: UIButton) {
// let activity = UIActivityViewController(activityItems: [canvasView.toImage()], applicationActivities: nil)
// present(activity, animated: true, completion: nil)
//
print("shareButtonTapped")
let objectsToShare = [canvasView.toImage()]
let activityVC = UIActivityViewController(activityItems: objectsToShare, applicationActivities: nil)
activityVC.title = "Share One"
activityVC.excludedActivityTypes = []
activityVC.popoverPresentationController?.sourceView = self.view
activityVC.popoverPresentationController?.sourceRect = sender.frame
self.present(activityVC, animated: true, completion: nil)
}
CropViewController.swift line at 148
func constrain(_ sender: UIBarButtonItem) {
let actionSheet = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
if let popoverController = actionSheet.popoverPresentationController {
popoverController.barButtonItem = sender
popoverController.permittedArrowDirections = .down
}
Hello,
I just noticed that if you move an element (e.g sticker) while editing a text, when the you finish the move gesture both toolbar (top) and done button are displayed on screen.
Not sure if best way to stop it is to detect that there is a textView that is firstResponder in #moveView (state == ended) and then keep tool bars hidden, or to force end edit when a move is detected (on element that is not current text).
BTW, great work ๐
I want to use all the features provided by you on a video.
Can you help me if it's possible?
If yes, then how I need to proceed for the same.
i when draw multiple things after that i want to erase particular single thing can't so can do it
i am trying call api with alamofire on continueButton click in PhotoEditor+Controls.swift file but i am not able to import alamofile in PhotoEditor+Controls.swift file so is there any reason behind that why i am not able to import alamofire
func imagePickerController(_ picker: UIImagePickerController,
didFinishPickingMediaWithInfo info: [String : Any]) {
guard let image = info[UIImagePickerControllerOriginalImage] as? UIImage else {
// picker.dismiss(animated: true, completion: nil)
return
}
picker.dismiss(animated: true, completion: nil)
let photoEditor = PhotoEditorViewController(nibName:"PhotoEditorViewController",bundle: Bundle(for: PhotoEditorViewController.self))
photoEditor.photoEditorDelegate = self
photoEditor.image = image
//Colors for drawing and Text, If not set default values will be used
//photoEditor.colors = [.red, .blue, .green]
//Stickers that the user will choose from to add on the image
for i in 0...10 {
photoEditor.stickers.append(UIImage(named: i.description )!)
}
//To hide controls - array of enum control
//photoEditor.hiddenControls = [.crop, .draw, .share]
present(photoEditor, animated: true, completion: nil)
}
i want to execute this code in a function. how to do that.?
Bravo ูุง ุญุงู ุฏ ูุงููู
Need more objects like arrow, oval, rectangle etc and scalable. How can i add these things?
When you push the PhotoEditorViewController and finish, you can see in the Xcode memory guage that a huge amount of heap memory isn't getting released. Most likely due to the image.
Here i've edited 5 different photos, going back to the main screen each time (which should reset the heap) . You can see every time the heap increases but does not go down after popping:
Hello,
when using an emulator or phone with notch display, the buttons are cut of from the notch.
guessing that you have to change the constrains to safe area.
thanks. J
Can you give me a workaround for this? I tried copying icomoon.ttf into various places in the Pod/. but that did not help
func registerFont(){
let bundle = Bundle(for: PhotoEditorViewController.self)
let url = bundle.url(forResource: "icomoon", withExtension: "ttf")
// Fatal error: Unexpectedly found nil while unwrapping an Optional value
guard let fontDataProvider = CGDataProvider(url: url! as CFURL) else {
return
}
Hi, how can i save the image as its original size? It is being resized when i try..
hi if i try to install it from pod
in the resource directory i see the xib file and not the storyboard
so the
let photoEditor = UIStoryboard(name: "PhotoEditor", bundle: Bundle(for: PhotoEditorViewController.self)).instantiateViewController(withIdentifier: "PhotoEditorViewController") as! PhotoEditorViewController
fail
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.