Skip to content

Instantly share code, notes, and snippets.

View subratastack's full-sized avatar
🎯
Focusing

Subrata Banerjee subratastack

🎯
Focusing
View GitHub Profile
@subratastack
subratastack / whatsapp-image-compression
Created October 3, 2019 19:49 — forked from akshay1188/whatsapp-image-compression
Whatsapp like image compression
- (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;
float compressionQuality = 0.5;//50 percent compression
if (actualHeight > maxHeight || actualWidth > maxWidth) {
@subratastack
subratastack / _mixins.styl
Created October 10, 2019 09:56 — forked from dmitrykuznetsovdev/_mixins.styl
mixins.stylus
// Display:
// appearance
// box-align
// box-flex
// box-sizing
// box-orient
// box-pack
// display-box
// overflow-sroll
// user-select