In layered materials and structures, it is essential to observe stress and strain concentrations, strain gradients, failure initiation and growth, and local microstructure evolution. In this study, an innovative phase-shifting technique is proposed, coupled with image-processing software, to investigate several interesting problems in electronic packaging. A window-based graphics interface for phase shifting in a moire interferometry system is introduced. The phase shifting is accomplished by driving the reference grating in the moire interferometry system with a low-voltage piezo stack. Three images obtained from three shifts and the original image are used to derive the phase diagram, which is used for displacement and strain calculations. Automatic fringe numbering is achieved by the phase shifting, which significantly simplifies the traditional fringe-counting and -ranking process. The strain calculation is also automatic, utilizing the space derivative of the displacement. A three- point bending beam is used for the demonstration. In addition, a power plastic IC package and a flip-chip package are selected to demonstrate the power of the system. A nanoscale deformation field is obtained for both the corner area and the flip-chip solder balls.