I am trying to extract the outline of UIImage for one of my application . The requirement is that ,i want to process the actual uiimage and extract the outline for painting as mentioned in the below picture. I found a solution that, we can implement this with imagemagick apis.
I am not sure whether any API is available in Iphone SDK for doing this.If not how can i implement this using imagemagick apis,(communication between C language in imagemagick and Objective C)
Thanks in advance...
Related
I am trying to make a slideshow of images from a folder but i don't know how to load the images from a folder in order and then display them onscreen. I am using an NSTimer to switch pictures but it only works if I know the filename for each image.
This is for a program that runs on Mac. I have tried NSFileManager according to other answers I have found on Stack Overflow, but I couldn't get them to work. I am using NSImage to load the image onto the view.
You do not need to do it yourself. Apple created for that (and more) the IKImage Kit. (Read the docs about that.) Here a short part of Image Kit Programming Guide:
A slideshow is a popular way for consumers to view digital images. The IKSlideshow class and the IKSlideshowDataSource protocol provide an easy way for your application to support slideshows of images . . .
Is there any filters available in ios to convert a image to cartoonistic image like exactly in the above picture?
For a much faster solution than ImageMagick, you could use the GPUImageToonFilter from my GPUImage framework:
It combines Sobel edge detection with posterization of the image to give a good cartoon-like feel. As implemented in this framework, it's fast enough to run on realtime video from the iPhone's camera, and is probably at least an order of magnitude faster than something similar in ImageMagick. My framework's also a little easier to integrate with an iOS project than ImageMagick.
If you want more of an abstract look to the image, the GPUImageKuwaharaFilter converts images into an oil painting style, as I show in this answer.
Try to use imagemagick for iOS http://www.imagemagick.org/download/iOS/
Of course you need some serval hours how to use imagemagick for iOS.
But then you should also look at: http://www.fmwconcepts.com/imagemagick/cartoon/index.php
and maybe also on:
http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=11140&start=0&st=0&sk=t&sd=a
This Core Image filter section in the iOS dev library, possibly combined with the script referenced by Jonas and a little luck, might get you where you're going. Not sure, having never used either of these technologies.
I’m currently researching the possibility to use Google’s WebP image format in our iOS software.
I found it’s not hard to decode the WebP into RGBA8888 as needed using the Google’s C-library.
However, I’d like to create an implementation comparable to UIImage in terms of both API and performance.
Q1. Is it possible in iOS to develop an image decoder so that native imageWithData and other APIs will read the new format?
Q2. If no, what API does UIImageView (and other framework-provided controls) use to draw the UIImage? Is it public (e.g. drawInRect/drawAtPoint) or internal?
Can I inherit from UIImage, override a few methods (such as +imageWithContentsOfFile, +imageWithData, +imageNamed, -drawInRect, -drawAtPoint), and have my WPImage objects behave well with SDK-provided APIs?
Q3. If every instance of my hypothetical WPImage class will subscribe for UIApplicationDidReceiveMemoryWarningNotification (to flush RGBA image buffer leaving the much smaller original WebP data in RAM), won’t it hurt the performance much?
The software we’re developing may easily have hundreds of different images in RAM.
I made full (decode/encode) UIImage wrapper for WebP.
https://github.com/shmidt/WebP-UIImage
There is an example . https://github.com/carsonmcdonald/WebP-iOS-example
WebP Image Support Coming to iOS 14
update your devices.
Another example I've written uses the work that Carson McDonald started but in a reusable fashion. Basically you add the WebP.framework to your project (included in my example or create-able using the instructions Carson has on his website) and then you can do something like this:
#import "UIImage+WebP.h"
...
self.imageView.image = [UIImage imageFromWebP:#"path/to/image.webp"];
// or
[self.button setImage:[UIImage imageFromWebP:#"path/to/image.webp"
forState:UIControlStateNormal]];
If you want to take a look at my example, go here: https://github.com/nyteshade/iOSWebPWithAlphaExample
First, decode the WebP pixels into a buffer. You then need to call CGDataProviderCreateWithData() to create a "data provider" for CoreGraphics and then call CGImageCreate() and pass in the provider and all the needed arguments. Finally, invoke UIImage imageWithCGImage:imageRef in order to create a UIImage instance.
SDWebImage is a library which provides an async image downloader which can easily be extended to support WebP via SDWebImageWebPCoder.
Any reliable third party library?
I've found Jitsik's Giraffe so far, but he said that it has poor palette handling.
Any other solution (some C library maybe)?
With ImageMagick.
3fr.ms implementation: Using ImageMagick to create animated GIFs on the iPhone
Hi i am beginner in iphone programming i am doing a photo gallery app. In which i need to apply swapping of array of images on UIImageView along with zooming action.
can any one help me to do this by providing any sample codes or links..
download try this code, i'm using it and it's well done:
mwaterfall-MWPhotoBrowser
there's also the more complete Three20 Photo (search in github.com or in stackoverflow.com for old question), it has more kind of objects... but is also more complicated to be used...