Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Dec 14, 2012, 09:48 PM   #26
ArtOfWarfare
macrumors 603
 
ArtOfWarfare's Avatar
 
Join Date: Nov 2007
Send a message via Skype™ to ArtOfWarfare
Quote:
Originally Posted by chown33 View Post
You should look at the resulting data in more detail. Seriously. At least do a couple of thought experiments, after familiarizing yourself with what an SVG representation actually looks like.

First, SVG is XML, which is fundamentally a text-based format. There are compressed representations, but support for them is not universal (nor universally required).

Second, a raster image is fundamentally a series of pixels with a color, possibly a different color in each pixel. So a simple alternating pixel pattern, like 0xFFFFFF 0xEEEEEE would have to be represented as a series of unit-length vectors that alternate between two colors. Any translation of the rasterized pattern back to a more vector-like representation requires some pretty clever de-rasterization heuristics.

Exercise #1: Take one line of 60 pixels alternating between two colors, and write out the SVG XML representation of it. Compare that to the PNG representation of the same 60 pixels (you are free to use any recognized PNG compression mechanism).


Next consider a rasterized linear gradient, at an angle of 30 degrees from the vertical. The color changes at every raster line, and also shifts horizontally from line to line. Again, how would you de-rasterize that back to a vector representation that specifies a gradient, angle, and colors?

Repeat the analysis on a radial (circular) gradient. You either have to encode a series of vectors, or de-rasterize back to the parameters for the radial gradient.
For your first scenario, I'd use patterns as described here:

http://www.w3.org/TR/SVG/pservers.html#Patterns

I don't understand your second example.

But I think you may have misunderstood what I was saying... I'm not saying we should de-rasterize existing graphics - we should just make SVGs a more widely supported format and use them extensively going forward.

As far as how to have a PNG fallback for browsers without SVG support:

http://www.w3.org/TR/SVG/backward.html

Last edited by ArtOfWarfare; Dec 14, 2012 at 09:53 PM.
ArtOfWarfare is offline   0 Reply With Quote
Old Dec 20, 2012, 01:53 PM   #27
astral125
macrumors 6502
 
Join Date: Jul 2011
Digital images don't have a dpi or ppi, because they are digital. When you print a digital image on paper, then they have dpi. When you display them on a screen, they are displayed at the ppi of the screen.

For example, take an image that is 300x300.

On an iPhone (retina) the image would be displayed at 326ppi. The image would display at 0.92 inches by 0.92 inches.

On an average computer screen, the image would be displayed at 72ppi. The image would be 4.17 inches by 4.17 inches.

So if your eyesight is good enough, you can make out the same level of detail on both screens even though the image is much smaller on an iPhone. You will be more likely to zoom in on an image on an iphone because it is so small, and it will look worse if you zoom it to the point where the image is displayed at 4 x 4 inches. If that is what your client is worried about, then you just need to provide an image with a resolution that is higher in the first place. This is independent of ppi. A good image might be 640 pixels wide so that is uses the entire width of the screen.

Regardless, the conversation should be about how big the client wants the images to display, not the ppi. Once you know the size they want, then you can figure the resolution out pretty easy.
astral125 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Screen-shot your home and lock screen! BlackBook88 Picture Gallery 262 Jun 20, 2014 10:13 AM
What app is this screen shot from? rep4cleveland21 iPhone 14 Nov 19, 2013 08:57 AM
Screen shot ??! jredecop Windows, Linux & Others on the Mac 1 Nov 1, 2013 01:27 PM
Need help please re screen shot macgirl2013 Mac Basics and Help 2 Jan 24, 2013 06:36 AM
How do I take a screen shot? Big Stevie Mac Basics and Help 4 Oct 6, 2012 07:26 PM

Forum Jump

All times are GMT -5. The time now is 01:42 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC