From where comes $scheme argument in image_style_deliver callback?
Drupal passes on extra portions of the URL as parameters by default. So for example, a URL might look like this:

http://example.com/sites/default/files/styles/style_name/public/foo/bar.jpg

Which resolves in image_style_deliver to

$style = 'style_name';
$schema = 'public';


The function then goes on to extract the rest of the unnamed arguments, and reconstitutes them to form the eventual path to the file.