id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
Python_StringIO/2205_61_0.txt
###
Python_StringIO/25046pilhowreturnstr_50_0.txt
On Fri, 14 Nov 2003 20:38:43 +0000 (UTC), JCM <jo******************@myway.com> wrote:
Python_StringIO/1006_229_0.txt
there's a problem with that though... installing on the interpreter means I'd have to delete .../data/Python/x86/, reinstall Portable Python 2.7.6.1 with all the included modules I need, copy the app/ directory to C:/ and rename it to Python27/, and then install PIL. then copy C:/Python27/ to .../data/Python/ and renam...
Python_StringIO/2205_56_0.txt
# Save to StringIO doesn't work #2205
Python_StringIO/775_40_0.txt
Same on a local windows pc... Is there something wrong with the source image file?
Python_StringIO/2205_40_0.txt
{{ message }}
Python_StringIO/25046pilhowreturnstr_126_0.txt
by: [ Hystou ](https://bytes.com/profile/564038/hystou/) | last post by:
Python_StringIO/1006_328_0.txt
if you installed the egg/whl through pip or some other installation utility, you may be better off creating a new issue for your case ;)
Python_StringIO/1006_196_0.txt
from data.Python.pillow import Image from data.Python.pillow import PngImagePlugin
Python_StringIO/775_51_0.txt
return "OK"
Python_StringIO/775_15_0.txt
from flask import Flask, request, json, Response, send_file from functools import wraps import requests import urllib from PIL import Image import ImageDraw, ImageFont import StringIO from os import listdir from os.path import isfile, join import random import sys, string, xmlrpclib, re
Python_StringIO/25046pilhowreturnstr_132_0.txt
by: [ tracyyun ](https://bytes.com/profile/561490/tracyyun/) | last post by:
Python_StringIO/1006_175_0.txt
from PIL import PngImagePlugin
Python_StringIO/1006_132_0.txt
hmm... ok it's not StringIO
Python_StringIO/25046pilhowreturnstr_45_0.txt
>> > > file = StringIO() > image.save(file, "JPEG") > return file.getvalue() > > > You are recommending shadowing 'file' ?!
Python_StringIO/775_57_0.txt
app = Flask(__name__)
Python_StringIO/1006_95_0.txt
Author
Python_StringIO/1006_223_0.txt
[ ![@Tcll](https://avatars.githubusercontent.com/u/773959?s=80&u=96a793e9582ba5f3f67877b81c28eb43e5c3cec7&v=4) ](/Tcll)
Python_StringIO/1006_129_0.txt
Author
Python_StringIO/2205_35_0.txt
To see all available qualifiers, see our [ documentation ](https://docs.github.com/search-github/github-code-search/understanding- github-code-search-syntax) .
Python_StringIO/2205_124_0.txt
[ update example for a post involving image editing ryanmcgrath/twython#537 ](/ryanmcgrath/twython/pull/537)
Python_StringIO/25046pilhowreturnstr_74_0.txt
[ PIL + Zope + resizing images ](https://bytes.com/topic/python/answers/38983-pil-zope-resizing-images)
Python_StringIO/2205_33_0.txt
Name
Python_StringIO/775_65_0.txt
@Cartroo: Thanks for trying. Have you used the Flask code actually or the did you invoke the code from the shell like demonstrated in my post from July 22, 2013, 4:06 p.m.? Just to clarify: The code works for me when invoked as a Flask App but not if invoked as a stand alone Python script.
Python_StringIO/1006_232_0.txt
if it can be made to be portable, that's always a plus ;)
Python_StringIO/1006_292_0.txt
[ ![@hugovk](https://avatars.githubusercontent.com/u/1324225?s=40&u=d7e2522cc357c1b8fed0f1c623c68c7331c70c56&v=4) ](/hugovk) [ hugovk ](/hugovk) closed this as [ completed ](/python- pillow/Pillow/issues?q=is%3Aissue+is%3Aclosed+archived%3Afalse+reason%3Acompleted) Nov 19, 2014
Python_StringIO/2205_136_0.txt
No branches or pull requests
Python_StringIO/2205_36_0.txt
Cancel Create saved search
Python_StringIO/25046pilhowreturnstr_148_0.txt
[ Trying to create a lan-to-lan vpn between two differents networks ](https://bytes.com/topic/networking/answers/979239-trying-create-lan-lan-vpn- between-two-differents-networks)
Python_StringIO/1006_66_0.txt
EDIT: nope, it's even doing this with the test png I used earlier... anyone know what's causing this??
Python_StringIO/1006_155_0.txt
Sorry, something went wrong.
Python_StringIO/1006_7_0.txt
Explore
Python_StringIO/1006_314_0.txt
print(' * Loading model...') get_model()
Python_StringIO/775_121_0.txt
![](/static/anywhere/images/spinner-small.gif) OK Cancel
Python_StringIO/25046pilhowreturnstr_31_0.txt
[ ](https://bytes.com/)
Python_StringIO/25046pilhowreturnstr_157_0.txt
By using Bytes.com and it's services, you agree to our [ Privacy Policy ](/privacy.html) and [ Terms of Use ](/terms.html) .
Python_StringIO/1006_306_0.txt
Copy link
Python_StringIO/25046pilhowreturnstr_47_0.txt
Jul 18 '05 # [ 5 ](https://bytes.com/topic/python/answers/25046-pil-how- return-stringio-image#post94198 "permalink")
Python_StringIO/775_99_0.txt
Having said that, it's an interesting problem and if you want me to try some more stuff I'm happy to do so. It's not a particularly urgent issue. I'm using PA only for nice-to-have stuff anyway.
Python_StringIO/1006_145_0.txt
anything you want me to try??
Python_StringIO/775_69_0.txt
16:51 ~/t $ cat > test.py import urllib from PIL import Image import StringIO
Python_StringIO/1006_300_0.txt
if request is from spider: use selenium else: return // when downloading images, selenium should be skipped.
Python_StringIO/25046pilhowreturnstr_11_0.txt
I have a script I pass (from Zope) an image file to, to do some PIL image stuff with it. I want a StringIO instance representing the altered image file to be returned. What is the method to get the image data (header and pixel data)? I tried Image.tostring(), but that only returns the pixle data. But to be able to use ...
Python_StringIO/25046pilhowreturnstr_10_0.txt
Hi,
Python_StringIO/775_11_0.txt
![Staff](/static/anywhere/images/staff.png) harry | 2710 posts | PythonAnywhere staff | July 22, 2013, 11:18 a.m. | [ permalink ](https://www.pythonanywhere.com/forums/topic/775/#id_post_5500)
Python_StringIO/2205_139_0.txt
## Footer
Python_StringIO/25046pilhowreturnstr_159_0.txt
BYTES.COM © 2024 [ About Bytes ](/about/bytes.html) [ Terms Of Use ](/about/terms.html) [ Privacy Policy ](/about/privacy.html) [ Sitemap ](/sitemap/)
Python_StringIO/775_85_0.txt
If ` Image.core ` isn't defined then it points to a failure to import ` _imaging.so ` . If ` Image.core.jpeg_decoder ` isn't defined then it would appear that somehow your version of PIL was compiled without JPEG support (it appears to be just a compile-time condition). If both of those are defined by the last functio...
Python_StringIO/2205_63_0.txt
edited by hugovk
Python_StringIO/1006_108_0.txt
from PIL import image import array, StringIO
Python_StringIO/775_118_0.txt
Sorry, there was an error connecting to the server. Please try again in a few moments...
Python_StringIO/1006_163_0.txt
---
Python_StringIO/1006_64_0.txt
if this works for you, google may have converted it, and I'll have to upload it somewhere else
Python_StringIO/25046pilhowreturnstr_22_0.txt
file = StringIO() image.save(file, "JPEG") return file.getvalue()
Python_StringIO/1006_80_0.txt
[ ![@wiredfool](https://avatars.githubusercontent.com/u/19792?s=80&v=4) ](/wiredfool)
Python_StringIO/775_119_0.txt
Sorry, we have had to rate-limit your feedback sending. Please try again in a few moments...
Python_StringIO/1006_243_0.txt
1. download [ https://pypi.python.org/packages/2.7/P/Pillow/Pillow-2.6.1-py2.7-win32.egg#md5=5e259043de952f723d5f6f93f5b42e0c ](https://pypi.python.org/packages/2.7/P/Pillow/Pillow-2.6.1-py2.7-win32.egg#md5=5e259043de952f723d5f6f93f5b42e0c) 2. Put the downloaded file at ...data/Python/x86/Pillow-2.6.1-py2.7-win32.egg 3...
Python_StringIO/Python_StringIO_4_1.txt
* [ ` io ` — Core tools for working with streams ]() * | * Theme Auto Light Dark | © [ Copyright ](../copyright.html) 2001-2024, Python Software Foundation. This page is licensed under the Python Software Foundation License Version 2. Examples, recipes, and other code in the documentation are addit...
Python_StringIO/775_83_0.txt
For reference, I'd expect the following:
Python_StringIO/25046pilhowreturnstr_155_0.txt
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
Python_StringIO/775_84_0.txt
>>> from PIL import Image >>> Image.core <module 'PIL._imaging' from '/usr/local/lib/python2.7/dist-packages/PIL/_imaging.so'> >>> Image.core.jpeg_decoder <built-in function jpeg_decoder> >>> Image._getdecoder("RGB", "jpeg", ("RGB", None)) <ImagingDecoder object at 0x7f6359442110>
Python_StringIO/1006_327_0.txt
all I can say is, check your relative installation of pillow if you're importing from the egg/whl without extracting it, make sure you provide the full path to the egg/whl in ` sys.path.append( fullpath ) ` once the full path is added, the egg/whl can be imported from, and should identify other modules. (note that the ...
Python_StringIO/1006_68_0.txt
EDIT3: I'm about to flip a table:
Python_StringIO/775_97_0.txt
![Staff](/static/anywhere/images/staff.png) giles | 12116 posts | PythonAnywhere staff | July 24, 2013, 5:11 p.m. | [ permalink ](https://www.pythonanywhere.com/forums/topic/775/#id_post_5596)
Python_StringIO/1006_51_0.txt
Jump to bottom
Python_StringIO/1006_35_0.txt
To see all available qualifiers, see our [ documentation ](https://docs.github.com/search-github/github-code-search/understanding- github-code-search-syntax) .
Python_StringIO/1006_119_0.txt
Member
Python_StringIO/25046pilhowreturnstr_26_0.txt
[ Christoph ](/register/)
Python_StringIO/25046pilhowreturnstr_17_0.txt
5 ![](/images/icons/chat.svg) 15175 ![](/images/icons/views.svg)
Python_StringIO/25046pilhowreturnstr_117_0.txt
[ Computer Hardware ](https://bytes.com/topic/computer-hardware/insights/)
Python_StringIO/1006_304_0.txt
Sorry, something went wrong.
Python_StringIO/1006_211_0.txt
Sorry, something went wrong.
Python_StringIO/775_10_0.txt
That is _weird_ . The web servers and console servers have exactly the same libraries and packages installed... Can you share a bit more example code, so we can try and repro?
Python_StringIO/775_48_0.txt
app = Flask(__name__)
Python_StringIO/775_28_0.txt
deleted-user-64250 | 10 posts | July 22, 2013, 2:01 p.m. | [ permalink ](https://www.pythonanywhere.com/forums/topic/775/#id_post_5509)
Python_StringIO/25046pilhowreturnstr_21_0.txt
> image.save('test', 'JPEG') > image=StringIO(image.????()) # what's the right method? > return image > > Any hints? Thanx!
Python_StringIO/775_5_0.txt
[ Start a new topic ](/forums/start_topic/) | [ Back to all topics ](/forums/) | [ This topic's RSS ](/forums/topic/775/rss)
Python_StringIO/1006_5_0.txt
* Product
Python_StringIO/25046pilhowreturnstr_131_0.txt
[ Discussion: How does Zigbee compare with other wireless protocols in smart home applications? ](https://bytes.com/topic/general/answers/979224-discussion-how-does-zigbee- compare-other-wireless-protocols-smart-home-applications)
Python_StringIO/2205_50_0.txt
Already on GitHub? [ Sign in ](/login?return_to=%2Fpython- pillow%2FPillow%2Fissues%2Fnew%2Fchoose) to your account
Python_StringIO/1006_84_0.txt
**[ wiredfool ](/wiredfool) ** commented Nov 13, 2014
Python_StringIO/2205_108_0.txt
image = Image.open("test.png") stream = BytesIO() image.save(stream, 'PNG')
Python_StringIO/1006_49_0.txt
By clicking “Sign up for GitHub”, you agree to our [ terms of service ](https://docs.github.com/terms) and [ privacy statement ](https://docs.github.com/privacy) . We’ll occasionally send you account related emails.
Python_StringIO/775_122_0.txt
Close
Python_StringIO/Python_StringIO_2_0.txt
## High-level Module Interface ¶ io. DEFAULT_BUFFER_SIZE ¶ An int containing the default buffer size used by the module’s buffered I/O classes. [ ` open() ` ](functions.html#open "open") uses the file’s blksize (as obtained by [ ` os.stat() ` ](os.html#os.stat "os.stat") ) if possible. io. open (...
Python_StringIO/775_70_0.txt
file = StringIO.StringIO(urllib.urlopen('http://www3.nd.edu/~networks/HumanDynamics_20Oct05/images/Einstein_1_JPEG.jpg').read()) img = Image.open(file) img = img.crop((0, 0, 400, 600)) #HERE IT BREAKS 16:51 ~/t $ 16:51 ~/t $ python ./test.py 16:51 ~/t $
Python_StringIO/2205_137_0.txt
4 participants
Python_StringIO/1006_279_0.txt
the import PIL in pillow.py just makes sys.modules contain 'PIL' so I can "from PIL import Image" in IMG.py
Python_StringIO/25046pilhowreturnstr_158_0.txt
To disable or enable advertisements and analytics tracking please visit the [ manage ads & tracking ](/manage-cookies.html) page.
Python_StringIO/1006_104_0.txt
im = Image.open(BytesIO( string(0) ))
Python_StringIO/25046pilhowreturnstr_79_0.txt
[ PIL thumbnails unreasonably large ](https://bytes.com/topic/python/answers/489478-pil-thumbnails-unreasonably- large)
Python_StringIO/1006_330_0.txt
from PIL import Image
Python_StringIO/25046pilhowreturnstr_89_0.txt
[ Opening colour BMPs with PIL ](https://bytes.com/topic/python/answers/573044-opening-colour-bmps-pil)
Python_StringIO/25046pilhowreturnstr_149_0.txt
by: [ TSSRALBI ](https://bytes.com/profile/564178/tssralbi/) | last post by:
Python_StringIO/1006_138_0.txt
importing Pikachu_eyesYellow.00.png 100%
Python_StringIO/1006_227_0.txt
**[ Tcll ](/Tcll) ** commented Nov 13, 2014
Python_StringIO/2205_48_0.txt
[ Sign up for GitHub ](/signup?return_to=%2Fpython- pillow%2FPillow%2Fissues%2Fnew%2Fchoose)
Python_StringIO/775_77_0.txt
18:43 ~/crons $ python Python 2.7.4 (default, Apr 19 2013, 18:28:01) [GCC 4.7.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import PIL >>> PIL.__file__ '/usr/local/lib/python2.7/dist-packages/PIL/__init__.py' >>> exit() 18:44 ~/crons $
Python_StringIO/2205_91_0.txt
Author
Python_StringIO/2205_121_0.txt
All reactions