Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8941913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:24:31+00:00 2026-06-15T11:24:31+00:00

Is it possible to use the google app engine python imaging library, from a

  • 0

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.

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.

I want to perform some manipulation upon an image (or images) before returning them in the response output of my python script.

When I use the Image.image( filename=<filename> ) function, the error I get informs me that the filename must start with “/gs”. Stepping into the __init()__ method of the Image object shows me that blobstore.create_gs_key() is used to create a blobkey if I supply a filename to the Image constructor.

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.

My trivial application handler currently looks like this;

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

My app.yaml looks like this;

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

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 /images. They are located in a subdirectory called gs/challenge.

Any assistance, suggestions or solutions much appreciated. Perhaps I am going about this entirely the wrong way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T11:24:33+00:00Added an answer on June 15, 2026 at 11:24 am

    You can load files from the local filesystem if you want just by uploading them along with your application.

    As long as you realise that they will never change and you can’t change them except when you deploy your application, and that there is a limit on the amount of space a deployed application can take up you should be OK.

    For example, I upload a .csv file along with my application and when it starts up for the first time it reads it and creates a record in the datastore related to it’s contents. I then never use that file again.

    Where you place your images is not really relevant, as you are manipulating them before you serve them to the user they are not “static content” as such and won’t be served to the user directly (as a .css file would be for example). As long as your application can load them that’s the right place.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to use SQLite as a relational database from Google App Engine?
Possible Duplicate: Choosing Java vs Python on Google App Engine We are going to
Possible Duplicate: How can I use the Google App engine bulkloader to back up
Using Django templates in Google App Engine (on Python), is it possible to compare
Google App engine documentation states that it is possible to upload and use third
I'm trying to use a MongoDB Database from a Google App Engine service is
I need to read a 5Mb file on Google App Engine (Python 2.7) and
Possible Duplicate: Choosing Java vs Python on Google App Engine What is more comfortable
I'm working with GWT and Google App Engine... I use com.google.gwt.core.ext.Generator to load dynamic
Using Google app engine, is it possible to initialize a globally accessible singleton on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.