Skip to content

Instantly share code, notes, and snippets.

@anotheruiguy
anotheruiguy / web-images.md
Last active February 19, 2025 08:41
What I learned about images and the web

I admit it, I have a print background. As much as I try to leave that all in the past, it always creeps up and bites me in the ass.

Pixel based image asset management is a mystery to many in print and in the new purely digital world. What constitutes a quality asset file to be reproduced? In print there are clear rules, but in digital display, there are many other variables at play. This post is a description of my journey in finally figuring this out.

The principals of an image

With every image, regardless of intended output, it has three primary attributes; pixel width and height, physical width and height, and dpi. Of course there is color space, color profile and a few others, but that is outside the scope of this discussion.

Images and print

@BenziAhamed
BenziAhamed / XML.swift
Created October 15, 2015 19:42
Example XML processing
//: Playground - noun: a place where people can play
import UIKit
let xml = "<coord2 count=\"3\">"
+ "<markers>"
+ "<marker>"
+ "<item>marker1</item>"
+ "</marker>"