Skip to content

Instantly share code, notes, and snippets.

View doppelganger9's full-sized avatar
💭
Now on Github even during my work day, but with another name.

David Lacourt doppelganger9

💭
Now on Github even during my work day, but with another name.
View GitHub Profile
#define MAXIMUM_IMAGE_WEIGHT 1024*1024
- (UIImage *)compressImage:(UIImage *)image {
float actualHeight = image.size.height;
float actualWidth = image.size.width;
float maxHeight = 600.0;
float maxWidth = 800.0;
float imgRatio = actualWidth/actualHeight;
float maxRatio = maxWidth/maxHeight;
#!/bin/bash
# usage :
# generate-iOS-app-icons.sh someDir/sourceImage-1024x1024.png path/where/ImagesAssets/is/located
mkdir -p generated
# you'll have to delete this one after executing the script if you copy the generated images in the Images asset
SOURCE_ICON="$1"
PATH_TO_IMAGES_ASSET="$2"