pike.git / lib / modules / _Image_PSD.pmod

version» Context lines:

pike.git/lib/modules/_Image_PSD.pmod:209:    rl += ({ decode_layer( l, data ) });       data->layers = rl;    return data;   }         array(object) decode_background( mapping data )   {    object img; -  if( data->depth == 1 && -  data->mode != Greyscale ) -  return ({ 0, 0 }); +        if( data->image_data )    img = ___decode_image_data(data->width, data->height,    data->channels, data->mode,    data->compression, data->image_data,       data->color_data);    return ({ img, 0 });   }   
pike.git/lib/modules/_Image_PSD.pmod:278:       mapping lopts = ([ "tiled":1, ]);       if( opts->background )    {    lopts->image = Image.Image( 32, 32, opts->background );    lopts->alpha = Image.Image( 32, 32, Image.Color.white );    lopts->alpha_value = 1.0;    }    -  [object img,object alpha] = decode_background( what ); +  object img, alpha; +  if( !what->layers || !sizeof(what->layers)) +  { +  [ img, alpha ] = decode_background( what );    if( img )    {    lopts->image = img;    if( alpha )    lopts->alpha = alpha;    else    lopts->alpha = 0;    lopts->alpha_value = 1.0;    } -  +  }    array layers;    if( lopts->image )    layers = ({ Image.Layer( lopts ) });    else    layers = ({});       foreach(reverse(what->layers), object l)    {    if( string m = translate_mode( l->mode ) )    {