How can I load vector image directly with iPhone SDK? - iphone

How can I load vector image directly with iPhone SDK? Just as UIImage loads bitmap images.

I did this recently using PDF. I saved some resolution independent images directly from Illustrator (using the smallest file size preset). I have some code (gists) here.

As of iPhone OS 2.1, the iPhone's WebKit supports SVG graphics natively. You should be able to use a UIWebView to load the SVG element for display. This question provides some sample code for doing so.

Related

save image in iPhone photo library with high resolution with retina display

I'm developing an app in which i have to save images in iPhone photo library. When i'm saving image in iPhoto library in app programmatically i want the image to be saved with high resolution with retina display. How can i achieve this?
Its upto your requirement how you are saving the images in the application. If you are resizing the images while saving them then you can try to save a better version as well so it may work in both resolutions. However, the question is very vague. Please do give some more explanation.

Vector Graphics in iOs?

i have a vector logo that i want to include in my view. I created a png out of it and put it into an imageView. Unfortunately, the logo in the simulator then is of poor quality, even though it looks fine in Interface Builder.
Do you have a recommendation how to solve that problem? Can i embed the eps in my app?
You could probably convert the eps to SVG and load it in a UIWebView.

How to convert PNG image to GIF in iPhone programmatically

How to picker some pictures from the library, and convert them to a gif?
There's ImageMagick for iPhone.Check Using ImageMagick to create animated GIFs on the iPhone.
Or search "ImageMagick for iphone" at Google
Check these Links
According to Apple,
Xcode automatically optimizes your PNG images using the pngcrush
utility shipped with the SDK. (You’ll find the program in the iPhoneOS
platform folders in /Developer. Run it from the command line with the
–iphoneswitch to convert standard PNG files to iPhone- formatted
ones.) For this reason,use PNG images in your iPhone apps where
possible as your preferred image format.
Better prefer to use PNG's for your image requirements
For Picking Image :
http://iphone.zcentric.com/2008/08/28/using-a-uiimagepickercontroller/
http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/CameraAndPhotoLib_TopicsForIOS/Articles/TakingPicturesAndMovies.html#//apple_ref/doc/uid/TP40010406
For Conversion :
http://blog.objectgraph.com/index.php/2010/04/05/download-an-image-and-save-it-as-png-or-jpeg-in-iphone-sdk/
Hope this Helps
You can create a GIF using the ImageIO framework, which is part of the iOS SDK. You don't need ImageMagick or any other third-party library.
Look at this answer for code that uses ImageIO to create an animated GIF. If you don't want an animated GIF, just add a single image instead of a bunch of images.
As for picking images from the library, there are many questions about this already on stackoverflow. Just search for [iphone] pick image from library.

Which are vector graphics based image format supported by iphone?

I have developed one game for iphone which uses png images.It works well but which are the vector graphics images supported by iphone that i can use for my game for better quality of image like when we zoom the image the image displayed properly.which are the most common image formats that are widely used by iphone game developers?
I saw this on github a while back. It claims to render SVGs to Core Image layers. I've never used it, but I know it exists.
The only vector graphics format that is directly supported on iOS is PDF (not counting UIWebView, which also supports SVG).
Vector graphics are not typically used in games, because they're much slower to render, but that depends on what type of game you're developing. I would consider using multiple versions of bitmap images with different resolutions for zooming.

can we use .jpg format images for mobile applications I.e iphone and android

i am working on mobile application where i need to display a background image using css sprites. here is the problem image size is 1600px width and 480px height. when i convert this image to png the file size is 400kb. and in jpg format it is 80kb.
So, my question is whether can i use the jpg format image in mobile application. especially in iphone and android........?
Thanks in Advance....
Yes
We can use jpg files BUT it is preferred to use png files as they are very lightweight to use.So as far as mobile apps are concerned png are the ones used.
Cheers