BLADE - Election Candidate Headshots
The ability to export headshots via a URL request was introduced in build 14.1.2.1.
Example URL starts with: https://chameleon/blade/election/headshots/...
This returns a zipped folder of the images. The following text files may also be included:
🗒️ _files.txt - a list of files included in the zip folder
🗒️ _messages.txt - optional messages that may indicate if non-fatal errors occurred with specific headshots.
🗒️ _missing.txt - will include a list of unavailable headshots or those it failed to add to the zip folder
URL Parameter | Description |
---|---|
Error Format | Select the error data format. Select from: XML, JSON, JSONP, BSON NOTE: this only applies to any error messages that may be generated if the request fails to produce a zip file. |
Event, Contest, Choice or Playlist | Select an event from the list. Then you can choose a specific contest or choice from that election event to limit it further. OR select a playlist and the results will include heads for candidates in the playlist’s contests. (The playlist, contest and choice options added in build 14.6.3.2) |
Include Missing | When checked - it will generate a text file with a list of candidates who did not have an assigned headshot to include in the zip file. This generated list is saved as a text file in the zip file. |
Limit | Specify the maximum number of headshots you want included. Useful if you have a large number of candidates and need to limit the download file size. Use in combination with the Offset to get all candidates. |
Offset | Specify the starting point of the headshots you want included. Useful if you have a large number of candidates and need to limit the download file size. Use in combination with the Limit to get all candidates. |
File Format and Alpha Color | The export process can convert the images to either PNG or JPG. If you do not choose a file format - no conversion is attempted. If converting to JPG format it is recommended to specify an Alpha Color to use as the background for any PNG images with alpha (transparent sections) |
Top Folder | The name of the folder to put all the headshots into inside the zip file. |
Sub Folder | You can choose to group the headshots into subfolders using
If you don’t select one of these then all files will go into the top folder. |
Max Width | Specify the width the images should be resized to fit into. |
Max Height | Specify the height the images should be resized to fit into. |
File Name Format | Use the following keywords to create a file name pattern
The keyword names are case sensitive. Write the keyword in all UPPERCASE to use uppercase values. Example [First] vs [FIRST] Example File Name Patterns include:
|
Name Override | Use this field to provide a custom file name instead of using the election name which is the default. |
Since | You can use the standard Since field to limit the results to only include headshots whose media record have been updated on or after a date and time you select. |
Quality | A non-zero value causes PNG images to be saved in an 8-bit format for smaller file sizes. A value of 1-100 causes JPG images to be saved with the corresponding quality level. A lower quality level will produce smaller files. If the field is blank or 0 then no change is made. NOTE: this is only able to reduce the quality and file size. |
Tips
Resize Images
Use the Max Width and Max Height field options to resize your images proportionally when exporting.
Compress Files
To try to generate smaller image file sizes - try setting the Quantity field to a non-zero value. See the details for the Quality options in the table above.