Ver Mensaje Individual
  #4 (permalink)  
Antiguo 02/10/2007, 14:44
Avatar de @ndreX!
@ndreX!
 
Fecha de Ingreso: abril-2007
Mensajes: 161
Antigüedad: 17 años, 10 meses
Puntos: 4
Re: Problema con los campos Blob

Si, necesitas la libreria GD, pero al parecer esta funcionando bien.

A ver... el problema mas bien parece lo q devuelve la BD, te tuvo q quedar mas o menos así:

Código PHP:
<?
    $cod 
$_GET['cod'];
    
header("Content-type: binary");
    require (
"Clase_Firebird.php");
    
    
$miconexion  = new DB_Fire ;
    
$Conexion      $miconexion->conectar();
    
$miconexion6 $miconexion->consulta($Conexion,"SELECT A.CORREGIR_ERROR FROM T006_ERRORES A WHERE A.CO_ERROR = ".$cod);
    
$fila2 ibase_fetch_object($miconexion6);
    
    
$image imagecreatefromstring($fila2->CORREGIR_ERROR);
    
header("Content-type: image/jpeg");
    
imagejpeg($image); 
?>
Si no funciona, puedes colocar directamente el header de image/jpg algo asi:

Código PHP:
<?
    header
("Content-type: image/jpeg");
    
ibase_blob_echo($fila2->CORREGIR_ERROR); #Suponiendo que esto es igual a un "echo"
?>
P.D: No se mucho acerca de IBase.

Espero te sirva. Saludos.