omar
omar

Reputation: 63

using PILLOW on App Engine instead of PIL

It turns out that PIL seems to have a problem of over-estimating the height of fonts. I've encountered this problem with PIL on App Engine. See more about this problem here

however, i don't have this problem with PILLOW on my local machine. i can kind of work around this problem, but ideally I'd use PILLOW instead of PIL on app engine. Is that possible?

Upvotes: 4

Views: 1968

Answers (3)

Silas S. Brown
Silas S. Brown

Reputation: 1652

You can now, if you're using a second-generation AppEngine Standard runtime. (The first-generation runtimes won't let you update after January 2024, so you'll probably be wanting to move to second generation anyway.) Just put pillow into requirements.txt

Upvotes: 0

user2771609
user2771609

Reputation: 1903

If you really need it, you can use a Managed VM and setup the libraries you want, including C based python libraries such as pillow.

Not that this is a simple solution. It affects scaling time (milliseconds to minutes according to google), cost (you pay for Cloud Compute Engine), and setup (you have to specify the right Docker container).

But it can be done.

Upvotes: 0

Tim Hoffman
Tim Hoffman

Reputation: 12986

No. PIL uses C based modules and so does PILLOW. You can only deploy supported modules as listed in 3rd party modules (like numpy) that have C based libraries see - https://developers.google.com/appengine/docs/python/tools/libraries27

Upvotes: 7

Related Questions