Skip to content

Instantly share code, notes, and snippets.

View xyulex's full-sized avatar

Raúl Martínez xyulex

View GitHub Profile
@xyulex
xyulex / IPAD: Safari font blurry
Created November 27, 2015 11:58
IPAD: Safari font blurry
-webkit-font-smoothing: subpixel-antialiased !important;
-webkit-perspective: 0px !important;
-webkit-backface-visibility: visible !important;
font-weight:normal !important;
@xyulex
xyulex / PHP: Add text to transparent PNG image
Last active July 21, 2018 15:30
PHP: Add text to transparent PNG image
<?php
$originalImage = "group_icon.png";
if(file_exists($originalImage)) {
$im = imagecreatefrompng($originalImage);
imagesavealpha($im, true); // important to keep the png's transparency
if(!$im) {
die("im is null");
}
$black = imagecolorallocate($im, 0, 0, 0);
$width = 36; // the width of the image