pike.git / lib / modules / _Image_PSD.pmod

version» Context lines:

pike.git/lib/modules/_Image_PSD.pmod:493:    if( lay->alpha() )    lay->set_image( lay->image(), lay->alpha()*lo );    else    lay->set_image( lay->image(), Image.Image( lay->xsize(),    lay->yszize(),    (int)(255*lo),    (int)(255*lo),    (int)(255*lo)));    }    -  if (opts->crop_to_bounds) { +  if (opts->crop_to_bounds && lay->image()) {    // Crop/expand this layer so it matches the image bounds.    // This will lose data which extends beyond the image bounds    // but keeps the image dimensions consistent.    int x0 = -l->xoffset, y0 = -l->yoffset;    int x1 = x0 + what->width - 1, y1 = y0 + what->height - 1;    Image.Image new_img =    lay->image()->copy(x0, y0, x1, y1);    Image.Image new_alpha =    lay->alpha() &&    lay->alpha()->copy(x0, y0, x1, y1);