In previous sections, you saw how you could manipulate the suffix of the image URL to display the same image in different sizes (if they exist on the Image server). There are some additional manipulations you can perform using the URL and achieve image effects that are not offered by Amazon Associates Web Service operations.
Discounts are often a sales driver for products. Amazon Associates Web Service can display discount icons by appropriately manipulating the image URL. For example, to add a 20% off icon, add "_PE20" (PE stands for "percent") to the URL right after the image identifier, as follows:
http://images.amazon.com/images/P/0976925524.01._PE20_SCMZZZZZZZ_.jpg
The following figures shows the addition of the discount icon.
Change the percent off by changing the numerical value. For example, to make the discount icon 30%, use _PE30.
Previous sections discussed how items can be associated with many figures, each offering a different view of the item. Sometimes, you can manipulate the image URL to produce those images. For example, if you add to the URL PTnn, where nn is a two-digit integer, you can display alternate views of the image. For example, if you add _PT20 to the above URL, you get:
http://images.amazon.com/images/P/0976925524.01._PE20_PT20_SCMZZZZZZZ_.jpg
The corresponding image is:
Rotating the image is the default behavior for items that do not have alternate views.In other examples where there are alternate views, you get an entirely different view of an item. For example, the URL,
http://images.amazon.com/images/P/B000AYGDIO.01._SCMZZZZZZZ_.jpg
returns the following image.
By adding PT02 to the URL,
http://images.amazon.com/images/P/B000AYGDIO.01.PT02._SCMZZZZZZZ_.jpg
the image changes to the following.
By adding PT03 to the URL,
http://images.amazon.com/images/P/B000AYGDIO.01.PT03._SCMZZZZZZZ_.jpg
the image changes to the following:
Using these extensions increases performance because you are not making Amazon Associates Web Service requests to retrieve the images. On the other hand, not all images have alternate views, and those that do do not have the same number of alternate views. When you enter a PTnn value that does not reference an image, the Image server returns a .gif image that is 1 by 1 pixel large. So, to display all of the different views of an item, you can increment, in the image URL, the PTnn value until a 1 by 1 pixel image is returned.
The PTnn value gets even more interesting as you increase its value. As you increase the value of nn from 1 to 90, the image rotates, correspondingly, to 90 degrees. As the number increases, the image spins and shrinks disappearing around a value of 130. The following figure shows PTnn values of 100, 105, 110, and 115.
To continue the rotation but grow the image from 0 to full size, increment the PTnn value from 325 (no image) to 360, at which point the image is full sized and upright, as shown in the following figures.
Amazon also supplies similar, rotated, scaled images between 130 and 325.