Spectral matting is the state-of-the-art image matting and also a milestone in theoretic matting research. For spectral matting without user intervention, the accuracy of alpha matte is low and the computational cost is high. Therefore, this paper presents a modified version of spectral matting to greatly increase the accuracy of alpha matte and effectively reduce the computational cost. In the proposed modified spectral matting, palette-based component classification is used to obtain reliable foreground and background components. Next, the corresponding matting components are obtained via a linear transformation of the smallest eigenvectors of the matting Laplacian matrix. Finally, the matting components of the foreground and the unknown regions are combined to from the complete alpha matte based on minimizing the matte cost. Moreover, image composition with consistency of color temperature is used to obtain the realistic image composition. Experimental results show that the proposed method outperforms the state-of-the-art methods based on spectral matting.