Patent ID: 8161379

Claim:
A method for preserving a size and aspect ratio of a placeholder when inserting or adjusting a picture inside the placeholder comprising the steps of: receiving a selection from a user to insert a picture into a placeholder by one of: dragging and dropping a new picture into the placeholder, selecting an icon on a toolbar for inserting the new picture into the placeholder, adjusting an existing picture to a different size within the placeholder, and replacing the existing picture in the placeholder with the new picture; receiving a user selection of one of: a fit to placeholder operation and a fill to placeholder operation; calculating a visible image area of the picture which will appear in the placeholder based on the user selection, wherein if the fit to placeholder operation is selected, a visible image area of the picture is equal to a size of the picture, and if the fill to placeholder operation is selected, the visible image area of the picture is equal to a size of the placeholder; if the fit to placeholder operation is selected, scaling the picture to a calculated visible image area such that the picture completely fits within the placeholder resulting in empty space appearing on one or more sides of the picture; if the fill to placeholder operation is selected, scaling the picture to the calculated visible image area such that the picture fills an entire area of the placeholder; enabling the user to slide the picture back and forth within the placeholder to further modify the visible image area after the insert is complete; enabling the user to select an option to finalize cropping when a desired crop is achieved; cropping the picture so that the placeholder is kept intact, the aspect ratio of the placeholder is preserved, and the aspect ratio of the scaled picture is preserved; when a rotation of the placeholder is different than a rotation of the picture being inserted into the placeholder, then calculating an axis-aligned bounding box, wherein the axis-aligned bounding box includes one of a box and a hyper rectangle of minimal dimensions with edges parallel to coordinate axes of the placeholder; and using the axis-aligned bounding box to control which region of the picture appears in the placeholder so that the rotation of the picture is preserved.