Skip to content
Jannis Rondorf edited this page Sep 20, 2015 · 2 revisions

S3 is able to perform Image Transformation, API Description: http://yourhead.github.io/StacksAPI/controls/imageTransform/index.html

Here are some plist examples. If you have more than one image transformation, make sure to add all image IDs, which you want to export (I guess all) to one of the file templates (e.g. HTML). If the image ID is nowhere referenced, the picture will not be exported.

Square image with max height and max width. The content will be cropped. Good for small square thumbnails:

<dict>
	<key>id</key>
	<string>img</string>
	<key>type</key>
	<string>imageTransform</string>
	<key>imageID</key>
	<string>%0%</string>
	<key>imageScaleMode</key>
	<integer>1</integer>
	<key>imageMaxHeight</key>
	<integer>2500</integer>
	<key>imageMaxWidth</key>
	<integer>2500</integer>
</dict>

Rectangle image with max height, but no max width. Content will not be cropped. imageMaxHeightEnable must be true, imageMaxWidthEnable must be false. imageMaxWidth is not respected, but must be given.

<dict>
	<key>id</key>
	<string>img</string>
	<key>type</key>
	<string>imageTransform</string>
	<key>imageID</key>
	<string>%0%</string>
	<key>imageScaleMode</key>
	<integer>0</integer>
	<key>imageMaxHeight</key>
	<integer>2560</integer>
	<key>imageMaxHeightEnable</key>
	<true/>
	<key>imageMaxWidth</key>
	<integer>2560</integer>
	<key>imageMaxWidthEnable</key>
	<false/>
</dict>

Rectangle image with max height or max width. Content will not be cropped. imageMaxHeightEnable and imageMaxWidthEnable must be true.

<dict>
	<key>id</key>
	<string>img</string>
	<key>type</key>
	<string>imageTransform</string>
	<key>imageID</key>
	<string>%0%</string>
	<key>imageScaleMode</key>
	<integer>0</integer>
	<key>imageMaxHeight</key>
	<integer>2560</integer>
	<key>imageMaxHeightEnable</key>
	<true/>
	<key>imageMaxWidth</key>
	<integer>2560</integer>
	<key>imageMaxWidthEnable</key>
	<true/>
</dict>

Original image size (but not original image). imageMaxHeight and imageMaxWidth are not respected, but must be given.

<dict>
	<key>id</key>
	<string>img</string>
	<key>type</key>
	<string>imageTransform</string>
	<key>imageID</key>
	<string>%0%</string>
	<key>imageScaleMode</key>
	<integer>0</integer>
	<key>imageMaxHeight</key>
	<integer>2560</integer>
	<key>imageMaxHeightEnable</key>
	<false/>
	<key>imageMaxWidth</key>
	<integer>2560</integer>
	<key>imageMaxWidthEnable</key>
	<false/>
</dict>
Clone this wiki locally