When you are reformatting image files using fit options, you can specify how IMS should handle files when you change the aspect ratio – scale, crop or pad. These options are provided with predefined formats (download categories) and the Fetch File feature.
The examples and explanation on this page are provided to help those who are not familiar with image editing to understand how these options work. The examples use the Fetch File feature but the scale, crop and pad options have exactly the same effect when used in the specification of predefined download size.
As you will see, IMS recognises the orientation of the original file (landscape, portrait, square) and applies the fit option you use appropriately.
Examples - Landscape-Oriented Original
The following examples use a .jpg file that is 1000 pixels wide x 368 pixels high. The folder in which the file is stored has been enabled for this type of publishing .
URL and parameters | Notes | Published Image |
http://imsdemonstration.thirdlight.com/file/7294160497 | Makes the file with IMS reference 7294160497 available on this URL |
|
In the following four examples, the dimensions specified increase the aspect ratio of published image when compared with the original file . | ||
http://imsdemonstration.thirdlight.com/file//7294160497/200x100 | Scales image proportionally based on width you specify and makes it available on this URL. The image may look the same at a glance because, unless you specify otherwise, IMS scales the image to width you specify rather than removing any elements of the picture. The result is a file with the same visual content as the original, but smaller: 200 pixels wide x 74 pixels high. The file stored in IMS is not resized – that ‘master’, remains as is. | |
http://imsdemonstration.thirdlight.com/file/7294160497/200x100/fit=scale | Produces exactly the same output as in the previous example because when no fit option is specified, images are scaled to fit by default. | |
http://imsdemonstration.thirdlight.com/file/7294160497/200x100/fit=pad | Scales image proportionally based on width you specify (as with the scale option) and adds padding to top and bottom of image to make up canvas size to the height you specify. \ In this example, scaling the image proportionally to 200 wide from 1000 wide, gives a height of 74 pixels: to make that up to 100 IMS adds 16 pixels of padding – 8 at the top and 8 at the bottom of the image. The file stored in IMS is not resized – that ‘master’, remains as is. | |
http://imsdemonstration.thirdlight.com/file/7294160497/200x100/fit=crop | IMS applies the width you specify from the centre of the image and removes any content that falls outside it. It then scales the height of the image to maintain the proportion of the original so that no further content is lost from the image. The result is a file at exactly 200 x 100 pixels. The file stored in IMS is not resized – that ‘master’, remains as is. | |
In the next three examples the dimensions specified decrease the aspect ratio of published image when compared with the original file, so IMS applies the fit options in a different way when compared with the previous three examples. | ||
http://imsdemonstration.thirdlight.com/file/7294160497/400x100/ http://imsdemonstration.thirdlight.com/file/7294160497/400x100/fit=scale | Both of these examples have the same affect because scale is the default fit option when no fit option is specified. The image is scaled proportionally based on the height specified. | |
http://imsdemonstration.thirdlight.com/file/7294160497/400x100/fit=pad | Scales image proportionally based on the height specified and adds padding to left and right sides of the image to make up canvas size to the width specified. | |
http://imsdemonstration.thirdlight.com/file/7294160497/400x100/fit=crop | IMS applies the height you specify from the centre of the image and removes any content that falls outside. It then scales the width of the image to maintain the proportion of the original so that no further content is removed from the image. The result is a file at exactly 400 x 100 pixels. The file stored in IMS is not resized – that ‘master’, remains as is. | |
http://imsdemonstration.thirdlight.com/file/7294160497/width=200 | Scales the image to 200 pixels wide and the height required to maintain the proportions of the original. In this example, the original image is 1000 x 368 pixels which is an aspect ratio of 2.72:1. With 200 specified as the required width, IMS scales the image to 200 x 74 which has the same aspect ratio as 1000 x 368, thus maintaining the proportions of the original at the same time as reducing the width, as required. | |
http://imsdemonstration.thirdlight.com/file/7294160497/height=100 | Scales the image to 100 pixels high and the width required to maintain the proportions of the original. In this example, the original image is 1000 pixels wide x 368 high which is an aspect ratio of 2.72:1. With 100 specified as the required height, IMS scales the image to 271 x 100 which has the same aspect ratio as 1000 x 368, thus maintaining the proportions of the original at the same time as reducing the height, as required. | |
http://imsdemonstration.thirdlight.com/file/7294160497/420,100-600,250 | Crops the original image by connecting the start position you identify (420 pixels from the left edge, 100 pixels from the top edge) and the finishing position you specify (600 pixels from the left edge of the original file and 250 from the top edge). | |
http://imsdemonstration.thirdlight.com/file/7294160497/400,50+300x300 | Crops the original image to 300 pixels wide x 300 high with the top left corner of the cropped image starting at 400 pixels from the left edge (of the original) and 50 pixels from the top edge. | |
http://imsdemonstration.thirdlight.com/file/7294160497/crop=420,100-600,250/100x100 | Crops the original image and then resizes the cropped image. Crops the original image by connecting the start position specified (420 pixels from the left edge, 100 pixels from the top edge) and the finishing position specified (600 pixels from the left edge of the original file and 250 from the top edge. This would produce a file at 180x150, but IMS then resizes the cropped image using the width specified. The result is a file at 100 x 83 pixels. | |
http://imsdemonstration.thirdlight.com/file/7294160497/download | Downloads a full-size copy of the original file from IMS to your PC/local network. | NA |
http://imsdemonstration.thirdlight.com/file/7294160497/format=PNG | Reformats the .jpg file to a .png file and makes the reformatted file available on the URL. The file stored in IMS is not reformatted – that ‘master’ remains as a .jpg file. | NA |
Examples - Portrait-Oriented Original
The following examples use a .jpg file that is 241 pixels wide x 361 pixels high. The folder in which the file is stored has been enabled for this type of publishing .
imsdemonstration.thirdlight.com/file/11836089949 | Publishes the full–size original file on this URL. | |
In the following three examples, the dimensions specified increase the aspect ratio of the published image when compared with the original file. | ||
imsdemonstration.thirdlight.com/file/11836089949/120x160 | Both variants scale the image proportionally based on the height specified | |
imsdemonstration.thirdlight.com/file/11836089949/120x160/fit=pad | Scales the image to the height specified and adds padding to the sides of the image to make the image up to the width specified. In this example, scaling the image proportionally to 160 high from 361 gives a width of 107: to make that up to 120 IMS adds 14 pixels of padding – 7 to each side of the image. | |
imsdemonstration.thirdlight.com/file/11836089949/120x160/fit=crop | IMS scales the width of the image to what you specify and then applies the height you specify from the centre of the image and removes any content that falls outside. The result is a file at exactly 120 x 160 pixels. The file stored in IMS is not resized – that ‘master’, remains as is. | |
In the next three examples, the dimensions specified decrease the aspect ratio of the published image when compared with the original file, so IMS applies the fit options in a different way when compared with the previous three examples. | ||
imsdemonstration.thirdlight.com/file/11836089949/160x320 | Scales the image proportionally based on the specified width. | |
imsdemonstration.thirdlight.com/file/11836089949/160x320/fit=pad | Scales the image proportionally based on the width specified and adds padding to top and bottom of the image to make up canvas size to the specified height. | |
imsdemonstration.thirdlight.com/file/11836089949/160x320/fit=crop | Scales the width of the image as specified and then applies the height specified from the centre of the image and removes any content that falls outside it. The result is a file at exactly 160 x 320 pixels. The file stored in IMS is not resized – that ‘master’, remains as is. | |
http://imsdemonstration.thirdlight.com/file/11836089949/50,0+150x320 | Crops the original image to 150 pixel wide x 320 high with the top-left corner of the cropped image starting at 50 pixels from the left edge of the original and zero pixels from it’s top edge. | |
http://imsdemonstration.thirdlight.com/file/11836089949/0,230-241,350 | Crops the original image to an area defined by the start position specified (0 pixels from the left edge, 230 pixels from the top edge) and the finishing position specified (241 pixels from the left edge of the original file and 350 from the top edge). | |
http://imsdemonstration.thirdlight.com/file/11836089949/crop=10,10-220,190 | Crops the original image and then resizes the cropped image. Crops the original image by connecting the start position specified (10 pixels from the left edge, 10 pixels from the top edge) and the finishing position specified (220 pixels from the left edge of the original file and 190 from the top edge. This would produce a file at 210x180, but IMS then resizes the cropped image using the width specified. The result is a file at 100 x 86 pixels. | |