Issue #5671: Fixed a bug about generateTintImage