简体   繁体   English

如何在App Engine中解码JPG中的像素(使用纯Python)?

[英]How to decode the pixels in a JPG in App Engine (using pure python)?

Using python App Engine I need to convert a JPG image that is one 9 MB file (of Pakistan's floods) into many PNG tiles. 使用python App Engine,我需要将一个9 MB文件(来自巴基斯坦的洪水)的JPG图像转换为许多PNG图块。

For the PNG part, I already know how to use PyPNG, which is great. 对于PNG部分,我已经知道如何使用PyPNG,这很棒。 Note: PIL cant be used with App Engine. 注意:PIL不能与App Engine一起使用。

So how do I decode the JPG into pixel data? 那么如何将JPG解码为像素数据呢?

Using Image class and crop and execute_transforms to encode as png? 使用Image类, cropexecute_transforms编码为png?

Note: You should provide relevant part of your code 注意:您应该提供代码的相关部分

You can use the efforts here to get a pure python JPEG Parser. 您可以在这里使用这些方法来获取纯python JPEG解析器。 Why the absolute need to use App Engine ? 为什么绝对需要使用App Engine? If you want more flexible library usage try EC2. 如果要更灵活地使用库,请尝试使用EC2。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM