Vector Graphics in iOs? - iphone

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.

Related

iPhone graphics: format for photo with transparency?

I have some graphics I want to import into iPhone application. They are people / animals from photos that I cropped out that so they have transparent backgrounds. Obviously, I can't use JPEG as is traditionally recommended for photos because of transparency so what would be the second best option? I'm currently using png-24, but I assume that's too big. Is gif OK? Or something else?
It is recommended by Apple to use PNG whenever possible. PNG is still a compressed format so I think you'll be fine with respect to size.

Partial black background in iphone safari

a few days ago I realized that my homepage www.blog-it-solutions.de will not correctly represented in iPhone Safari.
This is how it looks:
Has anyone an idea what happend?
Maybe it's a png which is somewhere in the page, i've had the same problem on my website and I solved it by converting the png into jpeg and it worked
You may either:
Re-save the files as other image files (JPEG, GIF)
If it is a gradient image, then you may use CSS3 Gradient to achieve the effect.

resizing images for iphone and ipad resolutions

I'm about to start a new iphone/ipad project which required a library of images. I've been trying to find if there are any pieces of software which would automatically resize images and save them in the right format for iphone and ipad... no such luck as yet!
So, I have large images of all different sizes. I need to create three images from each one.
iPad, iPhone (high res), iPhone (normal res)
I was thinking of recording something in Photoshop, but wondered if there's anything out there which already does this? My trouble is that I need to resize based on either the width or the height (which ever is larger).
Thanks for any tips!
Unless all your graphics are rasterized it might be better to do the resizing through Photoshop, that way you don't lose the pretty vector resizing. In Photoshop, I'd recommend checking out Export Layers to Files and Layer Comps to Files under File>Scripts. They've both proven invaluable while dealing with massive image libraries for universal apps.
How about some batch image resizer freeware, like this?
http://www.fotosizer.com/

How do I stop iPhones from resizing my background images?

You can see the problem at myspace.com/dejaentenduband
on an iPhone, the background image is shrunk by what appears to be nearly 50%
I haven't had this issue on on other browser. I'd expect the background to simply be cropped where it doesn't fit the screen.
Since it is unusual behavior, and apple must realise this, I'm hoping there is a pure css or HTML based solution. Should I be defining something differently or giving my page's body a particular attribute?
turns out that this has nothing to do with the viewport.
there's an article on it here:
http://www.defusion.org.uk/archives/2010/02/19/shrinking-large-background-image-bug-in-iphone-safari/
one of the limitations of an iphone is stated by Mac:
http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/CreatingContentforSafarioniPhone/CreatingContentforSafarioniPhone.html
JPEG images larger than 2 megapixels are subsampled - that is, decoded to a reduced size
Maybe you need to configure the page's viewport.
If the background image is taller than 1000px it will resize to the width of the viewport. Try reducing the height and see if this has an effect.
I just found out the easiest fix for this. Just open the image through Photoshop and save the image using the "Save for Web & Devices"..
Here is the easiest fix of ALL:
Open Fireworks, export your image as a 32 bit png, and use that png in your background. IOS doesn't scale THAT. Works like a charm, and the size is about the same as a jpg with 100% quality (slightly smaller actually)

Interface Builder can't display 160dpi images correctly?

I'm developing an iPhone app. A simple image is the background of the main view.
I've set an UIImageView in the background and set an image in, using IB.
the image is a 160dpi PNG image. It appears like CRAP in IB. When running in the simulator it is ok, crisp.
How am I supposed to work and place my controls precisely on a such poor resolution image ?
Is this a bug ?
Thanks for you help!
IB is not a tool for designing a UI, it is a tool for implementing one. It is designed to perform well rather than display well (this is more important in complex desktop UI design than mobile but the tool is the same for both). The best advice is perhaps to take a cue from the publishing world (where this is a common practice for applications that display large amounts of high resolution graphics such as Adobe InDesign) and keep track of exact measurements for controls - the x,y coordinate positions and height/width. Then you can use the inspector to precisely position controls.
Actually, the DPI is not irrelevant at all.
Change the DPI to 72 and the image will display in IB/Xcode fine.
I don't see anything like this when I work with images in IB. Maybe there's something special about your PNG file? You say that it's 160 dpi, which is fairly irrelevant. More important are what its pixel diomensions are, and how they compare to the screen size.
Maybe the UIImageView is having trouble rendering your PNG, and is for some reason using the preview icon instead? Try a different image, or try resizing your image to 480x320, with 32-bit color.
I am wondering about this as well. I don't think the DPI of the image is what is doing this, because I have a project where everything looks fine in IB on one machine, then on my laptop, it displays the way the OP is describing.
The image dimensions are the same as the iPhone screen and the view dimensions (320x480), but the image displays all tiny instead of filling up the whole dimeal nsions of the UIImageView. If I scale to fill, then the image gets all blurry, at 320x480, even though I can confirm that those are the actual dimensions of the image... It's acting as if the image itself is 320x480 of empty space with a small version of my image centered inside it... this is very strange. As I said- this is the same project that looks completely fine in IB on another machine (and when they build, they both look normal in the simulator). This also happens on my friends's macbook.
Is there some setting in IB that might be the difference?
EDIT:
Guess I spoke too soon- I went back to my other machine and noticed the same problem this time, and it indeed was the dpi. This must have been a change in one of the recent updates to xcode/IB, because I originally never saw this issue, and the image files are exactly the same... strange.