Is there some API on BlackBerry for "smooth" image resizing? - blackberry

To get image thumbnails on BlackBerry I use EncodedImage.scaleImage32(). It works Ok, but when I open native image viewer (from the Camera app) I see the difference in quality - native viewer thumbnails look nice (smooth, anti-aliased), while mine are a bit ugly. Looks like native viewer resizes images using some filter (bicubic or smth like that). How can I do the same? Is there some API for "smooth" resizing?

Starting in 5.0, the Bitmap class has a method called scaleInto() which can use a filter to perform smooth scaling of an image. The quality is MUCH better than scaling without a filter. See Bitmap.scaleInto() for more information.

Related

How to create a large jpeg image from svg image using macaw?

I want to create a high resolution image from a svg file.But i don't know how.Can i create it using macaw or there is another way.
SVG - is a vector format, it used in Android, but not iOS, so You can look for svg pods, like https://cocoapods.org/pods/SwiftSVG so You can add it in code directly
If You need it once - ask google "svg online converter" and convert it to png/pdf/jpg. For example: https://svgtopng.com
Macaw is currently in beta and it has limitations. It can create high-resolution image but it is limited and also macaw can not render all SVG.
But macaw is so far the best svg renderer for ios till now and they have done some really magical things.

iOS, Objective C auto image processing filters

I'm doing a photo app and sometimes the lighting is off in certain areas and the picture isn't clear. I was wondering if there was a feature that can auto adjust the brightness, contrast, exposure, saturation of a picture like in photoshop.
I don't want to manually adjust images like the sample code given by apple:
https://developer.apple.com/library/ios/samplecode/GLImageProcessing/Introduction/Intro.html
I want something that will auto adjust or correct the photo
As an alternative you could use AVFoundation to make your implementation of the camera and set the ImageQuality to high and the autofocus or tap to focus feature. Otherwise, I am almost certain you cannot set this properties, The UIImagePicker controller included in the SDK is really expensive memory wise and gives you an image instead of raw data (another benefit of using AVFoundation). This is a good tutorial for this in case you would like to check it out:
http://www.musicalgeometry.com/?p=1297
Apparently someone has created it on Github: https://github.com/proth/UIImage-PRAutoAdjust
Once imported, I used it the following:
self.imageView.image = [self.imageView.image autoAdjustImage];

Titanium Image Processing

I am currently working on Appcelerator (Titanium) and now I want colorize image in APP. Like I have an image and I can able to change its color through Hue or saturation just like in Photoshop. I have searched too many things but still nothing found in working condition.
Any help would be highly appreciable
Probably the best architecture is to create a webview in which you have a canvas tag, then you are able to use any canvas image manipulation library you wish. There are a number of them, but here are a few.

To Convert Image to Cartoon in ios

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.

Blur effect in a view of iOS

I want to use an UIImagePicker to have a camera preview being displayed. Over this preview I want to place an overlay view with controls.
Is it possible to apply any effects to the preview which will be displayed from camera? I particularly need to apply a blur effect to the camera preview.
So I want to have a blurred preview from camera and overlay view with controls. If I decide to capture the still image from the camera, I need to have it original without blur effect. So blur effect must applied only to the preview.
Is this possible using such configuration or maybe with AVFoundation being used for accessing the camera preview or maybe somehow else, or that's impossible at all?
With AV foundation you could do almost everything you want since you can obtain single frame from the camera and elaborate them, but it could lead you at a dead-end applying a blur on an image in realtime is a pretty intensive task with laggy video results, that could lead you to waste hours of coding. I would suggest you to use the solution of James WebSster or OpenGL shaders. Take a look at this awesome free library written by one of my favorite guru Brad http://www.sunsetlakesoftware.com/2012/02/12/introducing-gpuimage-framework even if you do not find the right filter, probably it will lead you to a correct implementation of what you want to do.
The right filter is Gaussian blur of course, but I don't know if it is supported, but you could do by yourself.
Almost forgot to say than in iOS 5 you have full access to the Accelerate Framework, made by Apple, you should look also into that.
From the reasonably limited amount of work I've done with UIImagePicker I don't think it is possible to apply the blur to the image you see using programatic filters.
What you might be able to do is to use the overlay to estimate blur. You could do this, for example, by adding an overlay which contains an image of semi-transparent frosted glass.

Resources