title: loading image from filesystem google app engine
body: <p>Is it possible to use the google app engine python imaging library, from a python script, to load an image file from the local filesystem? Or must images be loaded from the datastore? I can successfully load a text file and display it's contents.</p>
  
  <p>I am using google app engine with Python 2.7 and using the PIL imaging library. I am using PyCharm and Google App Engine Launcher on Mac OS X 10.8.2. I am using version 1.1.7 of PIL which I built from source.</p>
  
  <p>I want to perform some manipulation upon an image (or images) before returning them in the response output of my python script. </p>
  
  <p>When I use the <code>Image.image( filename=&lt;filename&gt; )</code> function, the error I get informs me that the filename must start with "/gs". Stepping into the <code>__init()__</code> method of the Image object shows me that <code>blobstore.create_gs_key()</code> is used to create a blobkey if I supply a filename to the Image constructor.</p>
  
  <p>Because I have a fixed set of images that I wish to manipulate, I was hoping to avoid having to manually upload them into the datastore for retrieval.</p>
  
  <p>My trivial application handler currently looks like this;</p>
  
  <pre><code>class ChallengeImageHandler( webapp2.RequestHandler ):
      def get(self):
          olifant = images.Image( filename='gs/challenge/C017.png' )
          logging.debug( "olifant.width=%d" % olifant.width );
          logging.debug( "olifant.height=%d" % olifant.height );
          self.response.headers[ 'Content-Type' ] = 'image/png'
          self.response.out.write( olifant )
          return
  </code></pre>
  
  <p>My app.yaml looks like this;</p>
  
  <pre><code>application: hello_world
  version: 1
  runtime: python27
  api_version: 1
  threadsafe: true
  
  
  handlers:
  
  - url: /stylesheets
    static_dir: stylesheets
  
  - url: /images
    static_dir: images
  
  - url: /.*
    script: main.application
  
  - url: /software_development.html
    script: main.application
  
  libraries:
  - name: jinja2
    version: latest
  - name: PIL
    version: latest
  </code></pre>
  
  <p>I understand that I could achieve the same result by serving the image statically, but once I have managed to successfully load the image, I wish to manipulate it before serving it up. I have deliberately placed the images that I wish to load from my application and not have served as static content by the google app engine web server in a separate directory than <code>/images</code>. They are located in a subdirectory called <code>gs/challenge</code>.</p>
  
  <p>Any assistance, suggestions or solutions much appreciated. Perhaps I am going about this entirely the wrong way?</p>