Challenge: Pixel perfect design
developer.apple.com
developer.apple.com
As for black and white, well, I have been thinking that way a little more when contemplating e-ink displays, which handle monochrome better than greyscale (faster, less ghosting). It may surprise those that don’t know to learn that reMarkable renders your writing strictly monochrome with no antialiasing, presumably for both of these reasons; and it works rather well, though I would appreciate a higher resolution than its 226dpi. (The UI is all firmly black-and-white with no greys, but they do use anti-aliased rendering throughout.)
Putting quality aside and thinking about the poor internet pipes; each image is around 100kb in size and had it been a two bit black and white PNG would have been around 12kb.
I know, I know, it's a probably an off the shelf CMS system but still, it's Apple, if anyone can afford to care about the little things like this shouldn't it be them?
unless i am missing something
BTW, the images also contain a grid, so you would need at least three colors, which requires 2 bit per pixel before compression.
Btw. what display/resolution are you using?
For one, browser's can't agree on what CSS solution to pick. Chrome and Safari have `image-rendering: pixelated` whereas Firefox has `image-rendering: crisp-edges`. The spec used to say pixelated meant "keep it looking pixelated" and that "crisp-edges" meant to keep the edges crisp and so allowed various algorithms. The spec was changed in early 2021 so that crisp-edges means "nearest-neighbor" and "pixelated" still means "keep it looking like pixels" which implies nearest-neighbor + extra.
It gets worse though. What is the web developer's intent?
Example: I put
<img src="128x128.png" style="width: 256px; height: 256px; image-rendering: pixelated">
Seems straight forward right? I want my 128x128 pixel image displayed double size (256x256) where each original pixel is 2x2 pixels on the user's machine.But, that's not how browsers work. My Windows Desktop has a devicePixelRatio of 1.25 so asking for a 256px by 256px CSS pixel image gives 317x317 device pixels. That means this 128x128 pixel image, scaled to 317x317 with nearest neighbor filtering is going to look really really bad as some pixels get 2x2 and others get 1x1 scaling. This is why `pixelated` = "nearest neighbor" may not actually be what the web designer wants.
Where as, if you manually scale the 128x128 image to say 512x512 using nearest neighbor and then let the browser scale it to 256x256 * devicePixelRatio using the default bilinear filtering it will likely look better.
Note: You can get these non-integer devicePixelRatio values on Chrome or Firefox just by zooming in the browsers (Cmd/Ctrl +/-). On Windows you can also go into the display settings and choose an OS level devicePixelRatio so that OS handled UI widgets and well written apps will adjust how they draw.
See example:
https://jsgist.org/?src=c65dfc4e2ed2e547a2d5aad69360be6d
Zoom in and out and, at least on my machines the right (pre-scaled externally and then scaled down) looks better than the left (original resolution with image-renedering: pixelated
https://drafts.csswg.org/css-images/#the-image-rendering
says
> pixelated:
> The image is scaled in a way that preserves the pixelated nature of the original as much as possible, but allows minor smoothing instead of awkward distortion when necessary.
The spec does not say "use nearest neighbor". In fact in specifically allows not using nearest neighbor (end of first sentence). And further, it doesn't specify the algorithm used.
So there is no true definition of what you'll get. There is only a general definition of the intent.
> The image must be scaled with the "nearest neighbor" algorithm: treating the original image’s pixel grid as a literal grid of rectangles, scale those to the desired size, then each pixel of the final image takes its color solely from the nearest pixel of the scaled original image.
and then it explicitly says in the pixelated section, right after the summarizing sentence you excerpted:
> For each axis, independently determine the integer multiple of its natural size that puts it closest to the target size and is greater than zero.
> Scale it to this integer-multiple-size as for crisp-edges, then scale it the rest of the way to the target size as for smooth.
The first sentence is descriptive; what is prescribed follows directly after it. I'm not sure how it could do more than that to define "what you'll get".
https://github.com/w3c/csswg-drafts/issues/6038
That said, my main point stands, Nearest Neighbor looks horrible when you have a non-integer devicePixelRatio which is relatively common. You'll get better results upscaling the image offline and then downscaling in the browser, rather than upscaling in the browser.
There is one: choose the size so that the image is displayed without scaling.
You're apparently not paying attention. There is currently no way to do that (except in Chrome via JavaScript maybe)
What size would you choose?
By default a browser will display the image at its natural size * devicePixelRatio. devicePixelRatio can be non-integer values. Further, the devicePixelRatio is fluid in Chrome and Firefox. Press Ctrl/Cmd +/- and it changes.
In Chrome (the only browser that's implemented ResizeObserver with devicePixelContentBoxSize), you can ask exactly how many devicePixels a given element is ... other browsers have not implemented this. And no, elem.getBoundingClientRect will not do it.
But, even if you have the API it would still be a pita. You'd have to take the size of your original image, figure out some integer-multiple that matches the current devicePixelRatio, pray that it still fits your design, create an element that large, then use the ResizeObverser to see if you really got that size. If not, adjust up or down a pixel at time until you do.
"pray that it still fits your design" means assume you had a 200x100 image you want displayed at 2x so 400x200 and the users DPI is 1.33. If you ask for 400x200 you'll actually get 532x266. Your 200x100 image will not scale pixel perfect to 532x266. You could, via JavaScript, compute what size to ask for to get 4x scaling. That size with a DPI of 1.33 is 300.7518796992481. You can't ask for a fractional size (well you can, but it's going to get rounded) But now your design no longer works. You expected the image to take 400 CSS units but it's only taking 300, too small. And, further, there's no guarantee you'll get 300. You might get 301. To find out requires the devicePixelContentBoxSize mentioned above
Yes there are a lot of complexities with that statement, but I personally think they would have a significant win here if they set a new bar of excellence as a part of the challenge.
The question was "Why are they using image that's been upscaled offline" and I have a reasonable explanation why someone might want to do that.
TL,DR; because it looks better across devices.
Pixel perfect meets JPG. What can go wrong ? /s
There is a unhealty love between JPG and the world of photography. I have an 8 Mpx phone but it chooses to use JPG with medium compression. Good bye quality. My camera also uses JPG but fortunately the compression ratio is not so big.
Every time I do it I'm impressed again and again what was possible with a 512x342 black & white screen and a 16 MHz 68030 attached to 8 MB of RAM (which is "overkill" for my use). It's incredible the collective and integrated creativity that was motivated by the constraints of the medium.
Seeing Apple propose this challenge makes me wonder if there's some kind of low-power, low-res product they're wanting to release where these kinds of design constraints are relevant again.
And this bullet point is underneath an example of... the "Photos" app icon, I believe? Which basically violates this suggestion, and as a result looks like a total mess in pixel format (even more so than than the real-life hidpi version on my iPhone).
Mail => envelope
Messages => message bubble
Photos => ...colorful peacock tail that suggests more of a "painter's canvas" than it does "photographs" ??
>Add details cautiously. If the content or shape is overly complex, details can be hard to discern. Icons at all three sizes should generally match in appearance, although you can explore subtle, richer, or more detailed additions at 48×48 pixel size.
I believe that example is meant to be an example of a bad icon, as it has a complex shape with lots of different textures.
are you sure? I'm holding up my iPhone side-by-side, an to me there's no doubt this is attempting to represent that. To represent the different colors, the pixel version uses a unique pattern for each "feather". It seems as 1:1 as a 48x48 pixel version could be.
Because of this obvious fact, I offered a common explanation among those designers I know that produced pixel art: that they simply do not consider the particulars of how pixel art was rendered on cathode ray tubes. Hence /perhaps/, a possibility is presented.
I find your counter-argument superficial and perhaps intentionally missing the point.
That being said, there were also a couple of years in the 2000’s where pixel-based icons were specifically designed for LCD.
That future is still as far away as it was 20 years ago.
So, another 10-20 years before nor requiring a pixel grid becomes a reality? So why pretend we don't need it now?
For example, see this camera icon: https://useiconic.com/icons/camera-slr/ (in the left pane, click the "three squares" icon to render them all at the same size). All three are vectors (you can inspect them if you want), but they still show different levels of detail. If you take the high-detail icon and render it at a small size, the details add visual clutter that are hard to understand at a small output size. Or with this book icon (https://useiconic.com/icons/book/), if you go the other way and scale the small book up to a larger size, it's harder to tell what it is because the "pages" part at the bottom is so thick -- which was a design necessity at smaller outputs, or it'd have been invisible, but at larger sizes it's too thick.
So even with vectors, the essential takeaway of this particular challenge still stands:
> [how to] distill the essence of your design and make sure your icon is clear and understandable at all sizes
Every vector icon still gets rasterized at some point for displaying to your monitor's pixel grid, not to mention human perception. Vectorization is a transport/delivery concern, but in and of itself it doesn't replace the thoughtful design of the pixel era.
Fonts can work similarly... they are usually vector these days, but still each glyph can look different at different sizes and can be dynamically controlled to look better at different render sizes: https://developer.mozilla.org/en-US/docs/Web/CSS/font-optica...
Even at the larger sizes, a vector won't always look great. If the renderer doesn't fudge vector edges to snap to pixel edges, you'll end up with blurry edges instead of clean, sharp ones.
Do you have an example? Text is essentially "vector" these days, and I've never heard of anyone complaining that text rendered on a modern screen has blurry edges. The blurriness of some text is often "cleartype" or whatever tricks are being used to make it look better on low-dpi screens, which end up making it worse on modern displays.
This has been an issue with application icons on Windows for a long time. For many applications the largest icon would be 32x32. So when they changed the default desktop icon size to 48x48, those all looked terrible. I hated seeing blurry icons enough that I would make a larger version myself if I couldn't find a decent replacement online
In some cases I would actually need to make a custom 16x16 or 24x24 icon, because whoever made the icon went the easy route of just scaling down a larger icon to create the small ones. Even if the source is a vector, most icons will not scale down to those sizes and retain readability since the details disappear. Alignment to the pixel grid is essential for tiny icons. In these cases I would have to use Resource Hacker to modify the icon stored in the executable (for desktop icons that wasn't needed since you can change a shortcut to use any icon file).
https://support.apple.com/guide/watch/add-music-apd483798d11...
Like can I download music directly to the Watch (what about DRM?) and can it connect to Airpods or other bluetooth without a phone?
It can connect to Bluetooth headphones just fine without an iPhone, I only carry the watch when I go for a run
BTW -- not implying there's malice here -- there is something genuinely fun about a design challenge like this, but I bet there's an ulterior motive too :)
https://www.youtube.com/watch?v=YThelfB2fvg
The improvements he made are also quite nice, Microsoft should take note...
Basically Apple have made it so that it’s literally impossible to be pixel perfect, even though they were in the best position by far to force developers to do it properly, in those few where it didn’t Just Work. Microsoft’s approach to fractional scaling is incomparably more sensible, and Wayland is finally heading towards being able to handle it properly (though I find it quite ridiculous that they didn’t just start by doing it properly).
edit I totally forgot about plug-in external displays… in which case, ya need 1440p or better.
You can’t really get 1440p monitors any smaller than 27” though. And I have a (really quite good) 27” 1440p monitor and it looks like dog shit on macOS. Same monitor under Windows looks great. Sure it doesn’t hold a candle to my MacBook’s own 220ppi screen but it handily outclasses whatever the hell macOS is doing at 1x scaling
I do use a 1440p monitor. The blurriness is still very much noticeable. It was much better on Mojave when all icons were drawn to the pixel grid.
And yes I'd buy a 5K monitor, which is the retina equivalent of 1440p, but these things aren't exactly easy to come by. Besides the blurriness is still visible even on retina displays, it's just not as pronounced.
I fully appreciate that it’s never gonna look anywhere near as good as a display with 4x as many pixels, but it’s really, really bad. The same monitor on a Windows machine looks great!
defaults -currentHost write -g AppleFontSmoothing -int 0
This should help with the font rendering.The new MacBook Pro for example uses perfect 2x scaling, but the MacBook Air has a smaller resolution screen and is not 2x.
It was never about supporting your own hardware, it was - give us your wallet and we will make it all work.
Still can't get over on Windows how 1 in 3 times when you move it to the edge of a window (might just be the lower left edge) the resize cursor appears gigantic and glitched out for a single frame.
Really don't understand how they either don't notice that stuff or just say "Yeah it's fine, just ship it". I know you can say "well it still works, it doesn't alter the functionality" but what if like every 3rd time you picked up a pencil I flashed a floodlight in your peripheral vision. Would probably push you out of your flow right?
I was making strip charts of data at fairly high density and wanted my minor grid lines to be one pixel wide. You must make them line up with a physical screen pixel or they turn into a blurry anti aliased mess. As of last year I never found a good way to connect a SwiftUI view to its physical screen pixel positions. I’ve done this for many years in UIKit, and while extra effort, it is at least possible.
I think this problem is partially why people used “magic marker” aesthetic on their digital charts rather than “engineering pad”. I guess it’s time for another crack at it.
Mostly, it’s possible there is an abstracted display at a non-native resolution over something like an HDMI. But if you are running your display at a non-native resolution then you just don’t care about details and you deserve what you get.
These days, I always use Adobe Illustrator to create my digital assets in vector form, and always start with black-and-white, for logos and icons. That's fairly standard "branding" stuff. The icon needs to be recognizable, even when reduced to 16 X 16 (OK, I'll allow 32 X 32), and in monochrome. I seldom need to move to Photoshop, to apply any raster work.
Nowadays, Apple allows vector assets, so I usually include them as vector PDF. It slows down Xcode, but seems to make the apps look a lot better, and they are probably much smaller (App size has never been an issue for me, anyway).
That all said, there are still some genuinely impressive efforts there.
Yeah me thing that definitely stood out was how a lot of the more iconic logos are already pretty simple (often even monochromatic). Though I do also believe there was a fair amount of selection bias going on too (people picking easy icons to redesign).
https://www.artlebedev.com/optimus/popularis/
(but with tactile feedback!! not one giant touch bar, lol)
There's that story of Jobs getting rid of the Apple Museum that occupied the foyer. Something about not wanting Apple to be a company that was living in its past.
First, Apple promoted skeuomorphism as the most visible difference from the pixelated look of Windows (OS X, 2001).
Secondly, they made pixel-perfect designs irrelevant by making a powerful, small handheld computer. It made the goals of pixel-perfect design futile and triggered the RWD trend instead (iPhone, 2007).
Thirdly, they successfully pushed Hi-DPI screens to the masses, which make the smallest elements on the screen too small for the naked eye to be seen. (Retina, 2010).
I say it with all due respect. These are absolutely brilliant achievements. Still, some "Yeah, thank us for killing pixels" would be in place.
So saying that the iPhone was responsible for RWD is too much credit I think.
[1] https://developer.apple.com/library/archive/documentation/Ap...
I believe you are right, but on a different level. Iphone started the mobile revolution which inspired other phone builders. When earlier we used build m.website.tld websites, the bigger screens from Iphone-inspired smartphones allowed us to use the same website, with mediaqueries.
Maybe it's because I'm Europe based, but we didn't really develop for iphones initally.