Arquivo da tag: converter

php: converter hex para rgb

fonte: https://stackoverflow.com/questions/15202079/convert-hex-color-to-rgb-values-in-php

 

If you want to convert hex to rgb you can use sscanf:

<?php
$hex = "#ff9900";
list($r, $g, $b) = sscanf($hex, "#%02x%02x%02x");
echo "$hex -> $r $g $b";
?>

Output:

#ff9900 -> 255 153 0
Anúncios

convertendo mp4 para gif

via linha de comando:

ffmpeg -i video.mp4 -pix_fmt rgb24 saida.gif