Estoy usando el que pusiste tu para hacer los thumbnails, pero importando yo a mi manera el archivo de la base de datos:
Código PHP:
header("Cache-Control: no-cache; must-revalidate");
header("Pragma: no-cache");
$conexion=mysql_connect("localhost","root","") or die ("no se ha podido conectar a la BD");
$result = mysql_db_query("FoToS-iRC", "SELECT * FROM bdnicks WHERE Valor='$v'");
$Mdb=mysql_fetch_array($result);
$imagen = $Mdb['Foto'];
Header ("Content-type: image/jpeg");
$img = imagecreatefromstring($imagen);
$picsize = 123;
$new_w = imagesx($src_img);
$new_h = imagesy($src_img);
$aspect_ratio = $new_h / $new_w;
$new_w = $picsize;
$new_h = abs($new_w * $aspect_ratio);
$dst_img = imagecreate($new_w,$new_h);
imagecopyresized($dst_img,$img,0,0,0,0,$new_w,$new_h,imagesx($img),imagesy($img));
imagejpeg($dst_img,'',100);
Si cambio el
$new_w = imagesx($src_img);
$new_h = imagesy($src_img);
por
$new_w = 118;
$new_h = 143;
que son las dimensiones ke tienen en realidad la imagen, me la abre del tamaño ese, pero... pierde colores, es norma eso? y se puede hacer algo para mantener los colores reales?