Phonegap simple editing - objective-c

I am currently about to start on a project in PhoneGap / Cordova.
In the application I would like to take a photo, with the getPicture function, and after this do a very simple photo editing.
The editing consist of the simple thing to add two points (circles, dots, whatever) to the picture, and then save it, and use for upload.
I can't seem to find any plugins offering this function, so what I seem to need is some native code, that I can implement as a plugin by myself.
What is the easiest way to achieve this?
Any help, pointing me in the right direction will make me happy.
Thank you,
Jens

I think what you need is html5 canvas.
I have experienced in editing the image on the webcam with phonegap.
However, the requirement of you seems to be easier. You can take a photo with getPicture api at first. Then do what you want on canvas.

Related

What is the best way to display and interact with a skill tree

I am trying to create an interface that is similar to the interface on this website for the skill tree: http://www.pathofexile.com/passive-skill-tree. What is the best way to go about doing this and have the same or similar user interaction. ie. you click on a node and it activate or deactivates it. The movement of the tree and zooming on it would be nice as well. Would like to try to stay away from webView as I am thinking about features I want to add. Thanks in advance just want to see what a good way to do this is.
you can use webView and have almost a copy-paste of the presented webpage html source and load it.
However with native components you can have better performance, but it will "not a copy"
Native componets:
IIViewDeckController for iOS
iHasApp for iOS
iHasApp for iOS
There are more on that side. Consider a combination of they,

Video.js changing source and seeking simultaneously

I am trying to build a site using video.js to view videos. We need to switch videos while maintaining the currentTime value from the old video. The way I have it working right now is using the loadedmetadata event to set currentTime. The problem I am seeing with this is that the first frame of the video gets shown momentarily while the player seeks to the right time. I am new to JS programming so perhaps I am doing something wrong but I do not see anything in the docs that can help me overcome this. I am trying to render H.264/mp4 videos in Chrome. Thanks!
Changing the preload setting to 'metadata' might help this in the browsers that support that setting.
preload="metadata"
Then it supposedly should only load the metadata and trigger the loadedmetadata event, and not show the first frame. That is unless providing any new src forces preloading, and I'm not sure off the top of my head.
HTML5 video doesn't give us a lot of options around seamless switching videos unfortunately. The media source API proposal from Google/Microsoft/Netflix aims to fix this. http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html
You could try this:
https://bitbucket.org/felixschwarz/videojs-hdtoggle/
As seen here on the old videoJS-Forum I think you might have to declare preload="auto".
In the linked forum-threat there are also some changes I made documented.

Animation/Transition-Creator for iOS/Objective-C?

Together with an illustrator I want to create some screens with lots of animations/transitions (moving sprites). I need the illustrator to do the animation. He knows how to use AfterEffects so best would be some kind of timeline-tool to create the transitions/scalings/alphas etc.
My question is now: Is there some kind of tool out there that could be used to create animations and then export the used parameters to objective-c to import it to xcode?
Thanx!
To my knowledge: No.
We spend some time a couple of months back trying to find something similar to Expression blend, just for iOS, but without luck.
If you however are planing to make your app for MacOS and not iOS you can take a look at quartz composer. For iOS you could also take a look at storyboard (here is a link to fairly good tutorial), but I'm afraid your needs will not be met by the features of storyboard.
I found Flash2Cocos2D and I think this is the best solution available right now.
Also promissing: cocosbuilder!

Very confused by a binding issue between a Cocoa app and a Movie Loader patch in Quartz Composer

I've been programming for a while, but just recently decided to start developing for Mac OS X. I feel like I've come to grips with the basics of Objective-C and Cocoa development over the past week. I'm planning on making graphics apps, and as such am currently in the process of learning how to control Quartz compositions through a Cocoa app. I went through the tutorial that apple offers (with the Mac Engravings composition), and was able to create that just fine. In order to make sure that I truly understood what I learned, I decided to create my own composition and link it to a slightly more complicated Cocoa application.
Essentially, I have a composition that loads a movie or image through a Movie Loader patch, at which point it applies various filters to the frames before outputting it. In my Cocoa app, I've written code (or rather copied and pasted from other apple examples) that lets a user pick a file using an NSOpenPanel object. The filepath of the file they pick gets placed in a text-box that I placed in the app's window using Interface Builder. I binded the value of said text-box to the "Movie_Location" key in my composition, which is a published input in the Movie Loader patch that I'm using. However, no matter what I do, movies and images aren't loaded into this composition no matter what I try. The only thing that gets displayed is the default image that I have saved in that input from Quartz Composer (or nothing if I leave it blank before publishing).
I've added a Clear Color patch to the composition and binded that to a colorwell in my UI, and that successfully changes the color in my display, so I know that the composition and my Cocoa app are communicating. I've spent numerous hours at this point trying to figure out what's going on, and I've just about given up. Does the Movie Loader have any weird behaviors that I'm not aware of, or is there something obvious that I seem to be missing? I'd really appreciate any help or advice from anybody.
Thanks for reading through this...
Best,
Sami
There are two things I can think of as reasons why it is doing this:
The file path isn't formatted incorrectly. Try checking backslashes, colons, etc.
The box isn't updating the value. Try literally clicking in the text field and hitting enter.
That's all I can think of without seeing your quartz composition and/or code.
EDIT:
Check the other continuous box, in the general properties.
I figured this out yesterday. spudwaffle's second idea is what was going on. If I were to type a filepath in and hit enter, it would work just fine. I got this to work properly by just removing the bind and instead using the setValue:keyInPath: function that a patch controller offers. That said, is there some way to force a text-box to update? I remember seeing a "continuously update" or something like that button within the bind sub-menu in the inspector, but my code didn't work with that checked either.
Thanks to those of you that tried to help me! I really appreciate it.
Best,
Sami

Displaying image on Scroll View

I am developing an iPhone application where i want to display three image in each row on scroll view where i need to click action on each image like Photo album in iPhone. I am not getting any sample code.
Hoping for help
subodh
There's plenty of sample code out there, I found this after only basic googling. You want to search for "UIImageView Iphone". It's also worth mentioning that Apple's very own Developer Center is extremely well written, and will teach you everything you need to know about iPhone programming.
Generally it is frowned down upon to say to look more or read documentation, but you really haven't looked at all. Especially because of Apple's own resource that tells you how to do almost anything, especially something like this. It's not something you can pick up and bits and pieces of and expect to be successful with, it really should be learned starting from the beginning and moving forward. This is especially true if you've never programmed before or are unfamiliar with C/Objective-C.
Three20 has a photo browser that is open source and works similarly to the iPhone's photo browser with some nice code examples. The images come from an image source object that can relate them to images in your apps bundle or images on the web. Looks like its Google group is here. I think that to use images in your bundle you use a URL formed like: bundle://image-name.png and not the typical use of the main bundle to get a path to resource.