Roxen.git/
server/
modules/
graphics/
cimg.pike
Branch:
Tag:
Non-build tags
All tags
No tags
2002-07-03
2002-07-03 13:02:13 by Martin Nilsson <mani@lysator.liu.se>
9b625248298fffc33b02b3b64802516c4cd5b4c0 (
16
lines) (+
12
/-
4
)
[
Show
|
Annotate
]
Branch:
Aphoto_2.0_beta3
Improved error handling.
Rev: server/modules/graphics/cimg.pike:1.51
7:
roxen.ImageCache the_cache;
-
constant cvs_version = "$Id: cimg.pike,v 1.
50
2002/
06
/
18
16
:
17
:13 nilsson Exp $";
+
constant cvs_version = "$Id: cimg.pike,v 1.
51
2002/
07
/
03
13
:
02
:13 nilsson Exp $";
constant module_type = MODULE_TAG; constant module_name = "Graphics: Image converter"; constant module_doc = "Provides the tag <tt><cimg></tt> that can be used "
158:
else { mixed tmp = roxen.load_layers( args->src, id, opts );
-
if (mappingp(tmp)
&&
tmp->error == 401)
+
if (mappingp(tmp)
)
{
+
if (
tmp->error == 401)
return tmp;
-
+
else
+
layers = 0;
+
}
else layers = tmp; }
171:
error("Failed to load specified image [%O]\n", args->src); }
+
if (!sizeof(layers->image() - ({0})))
+
error("Failed to decode layers in specified image [%O]\n", args->src);
+
layers->set_misc_value( "visible",1 ); foreach( layers, Image.Layer lay ) if( !lay->get_misc_value( "name" ) )