function
CargarJpeg
(
$nombreimg
)
{
$im
=
@imagecreatefrompng
($nombreimg)
;
/
*
Intento
de
apertura
*
/
if
(!$im
)
{
/
*
Comprobar
si
ha
fallado
*
/
$im
=
imagecreate
(150
,
30)
;
/
*
Crear
una
imagen
en
blanco
*
/
$bgc
=
imagecolorallocate
($im
,
255
,
255
,
255)
;
$tc
=
imagecolorallocate
($im
,
0
,
0
,
0)
;
imagefilledrectangle
($im
,
0
,
0
,
150
,
30
,
$bgc)
;
/
*
Mostrar
un
mensaje
de
error
*
/
imagestring
($im
,
1
,
5
,
5
,
"Error
cargando
$nombreimg"
,
$tc)
;
}
return
$im
;
}
|