ZoneMinder/ZoneMinder — pull request #241 by mastertheknife (2013-11-04 11:23:19+00:00)
Title: Add alarm reference image blend percentage option and replace the text field if fast blend is enabled

In order to improve ZoneMinder's already great motion detection system, i find it necessary to have the ability to use a different reference image blend percent for an alarm state.
This pull request adds such option, as can be seen in the screenshot below.
This option is very useful for controlling how long an alarm lasts. For example, If i set it to not blend and stand in front of my camera, the alarm will last forever, until i move out of the camera's way. If i try again, this time with 50%, the alarm will last only a moment. I have chosen 3.125% as a default because it seems optimal according to my tests.
If anyone is looking for the behaviour of ZM without this option, simply set it identical to your non-alarm reference blend percent.

Something else this pull request does is replace the text field with a dropdown list if fast blends are enabled. Fast blend does not use division, but rather bit shifting, so only few values are possible and other values simply get rounded to the closest one. By using a dropdown list when fast blends are enabled, we make it easier for the user to select a reference image blend percent.

Currently, i am missing the code to alter the database to add the new field. Not sure how to tackle this one yet. I thought of creating a zm_update-1.26.4 file for ZM 1.26.5, but this will require us to change version numbers now to 1.26.5.
The SQL statement to alter the Monitors table:
```
ALTER TABLE `Monitors` ADD `AlarmRefBlendPerc` TINYINT(3) UNSIGNED NOT NULL DEFAULT '3' AFTER `RefBlendPerc`;
```

http://i.imgur.com/P2fIyyZ.jpg