id stringlengths 16 145 | text stringlengths 1 179k | title stringclasses 1
value |
|---|---|---|
Python_StringIO/1006_93_0.txt | [

](/Tcll) | |
Python_StringIO/1006_331_0.txt |
--- | |
Python_StringIO/1006_265_0.txt | ### | |
Python_StringIO/775_64_0.txt | deleted-user-39880 | 669 posts | July 23, 2013, 8:55 a.m. | [ permalink
](https://www.pythonanywhere.com/forums/topic/775/#id_post_5531) | |
Python_StringIO/1006_336_0.txt | No one assigned | |
Python_StringIO/25046pilhowreturnstr_70_0.txt | by: Raaijmakers, Vincent (IndSys,GE Interlogix) | last post by: | |
Python_StringIO/1006_233_0.txt | --- | |
Python_StringIO/1006_285_0.txt | wait a minute... I think I understand what you were trying to tell me here
now... heh
but for portablility instead of localized | |
Python_StringIO/775_19_0.txt | if dst_ratio < src_ratio:
crop_height = src_height
crop_width = crop_height * dst_ratio
x_offset = float(src_width - crop_width) / 2
y_offset = 0
else:
crop_width = src_width
crop_height = crop_width / dst_ratio
x_offset = 0
y_offset = float(src_height - crop_height) / 3
img = img.crop((int(x_offset), int(y_offset), in... | |
Python_StringIO/25046pilhowreturnstr_99_0.txt | [ PyCairo, PIL and StringIO
](https://bytes.com/topic/python/answers/754305-pycairo-pil-stringio) | |
Python_StringIO/25046pilhowreturnstr_16_0.txt | [ Subscribe ](https://bytes.com/subscription.php?do=addsubscription&t=25046) [
Post Reply ](/register/) | |
Python_StringIO/Python_StringIO_3_3.txt | ion that
defers to ` readinto() ` .
A typical ` BufferedIOBase ` implementation should not inherit from a `
RawIOBase ` implementation, but wrap one, like ` BufferedWriter ` and `
BufferedReader ` do.
` BufferedIOBase ` provides or overrides these data attributes and methods in
addition to those from ` IO... | |
Python_StringIO/2205_140_0.txt | [ ](https://github.com "GitHub") © 2024 GitHub, Inc. | |
Python_StringIO/1006_228_0.txt | thank you for considering my autism :)
(not many people do that) | |
Python_StringIO/1006_261_0.txt | Sorry, something went wrong. | |
Python_StringIO/2205_99_0.txt | Sorry, something went wrong. | |
Python_StringIO/25046pilhowreturnstr_144_0.txt | by: [ isladogs ](https://bytes.com/profile/125153/isladogs/) | last post by: | |
Python_StringIO/1006_213_0.txt | Copy link | |
Python_StringIO/1006_121_0.txt | **[ wiredfool ](/wiredfool) ** commented Nov 13, 2014 | |
Python_StringIO/1006_26_0.txt | [ Search syntax tips ](https://docs.github.com/search-github/github-code-
search/understanding-github-code-search-syntax) | |
Python_StringIO/2205_127_0.txt | Assignees | |
Python_StringIO/775_35_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 | |
Python_StringIO/2205_27_0.txt | # Provide feedback | |
Python_StringIO/2205_20_0.txt | * [ Topics ](https://github.com/topics)
* [ Trending ](https://github.com/trending)
* [ Collections ](https://github.com/collections) | |
Python_StringIO/1006_206_0.txt |
IMG.py: | |
Python_StringIO/775_29_0.txt | OK, I can't use that code to try and reproduce the error, because I don't have
access to that XMLRPC thing. Can you simplify it down and try and create a
"minimal repro"? | |
Python_StringIO/1006_56_0.txt | # IOError: cannot identify image file (StringIO and BytesIO) #1006 | |
Python_StringIO/775_53_0.txt | deleted-user-64250 | 10 posts | July 22, 2013, 9 p.m. | [ permalink
](https://www.pythonanywhere.com/forums/topic/775/#id_post_5527) | |
Python_StringIO/775_92_0.txt |  giles | 12116 posts |
PythonAnywhere staff | July 24, 2013, 2:55 p.m. | [ permalink
](https://www.pythonanywhere.com/forums/topic/775/#id_post_5587) | |
Python_StringIO/1006_139_0.txt | Traceback (most recent call last):
File "Z:\home\tcll\sync\copy\UMC_v3.0a\data\FORMAT.py", line 780, in ugeSetImageData
W,H,img,plt = sys.modules[COMMON._ImgScripts[it]].ImportImage(it)
File "scripts\IMG.py", line 72, in ImportImage
im = Image.open(f)
File "Z:\home\tcll\sync\copy\UMC_v3.0a\data\Python\PIL\Image.py", li... | |
Python_StringIO/25046pilhowreturnstr_141_0.txt | [ 0 ](https://bytes.com/topic/access/insights/979232-access-europe-using-vba-
create-class-based-table-wed-1-may) | |
Python_StringIO/1006_168_0.txt | Author | |
Python_StringIO/Python_StringIO_3_7.txt | oding
error (the default of ` None ` has the same effect), or pass ` 'ignore' ` to
ignore errors. (Note that ignoring encoding errors can lead to data loss.) `
'replace' ` causes a replacement marker (such as ` '?' ` ) to be inserted
where there is malformed data. ` 'backslashreplace' ` causes malformed data
to be... | |
Python_StringIO/2205_111_0.txt | All reactions | |
Python_StringIO/1006_266_0.txt | **[ wiredfool ](/wiredfool) ** commented Nov 13, 2014 | |
Python_StringIO/1006_195_0.txt |
then took a scroll to the top and found "from PIL import Image".
since I'm using pillow.py, a separate local instance is created,
where simply importing the PngImagePlugin module updates the global instance.
in IMG.py: | |
Python_StringIO/1006_254_0.txt | Traceback (most recent call last):
File "Z:\home\tcll\sync\copy\UMC_v3.0a\data\FORMAT.py", line 780, in
ugeSetImageData
W,H,img,plt = sys.modules[COMMON._ImgScripts[it]].ImportImage(it)
File "scripts\IMG.py", line 65, in ImportImage
from PIL import Image
ImportError: No module named PIL | |
Python_StringIO/Python_StringIO_3_5.txt | RawIOBase ` raw binary stream. It inherits from ` BufferedIOBase
` .
When reading data from this object, a larger amount of data may be requested
from the underlying raw stream, and kept in an internal buffer. The buffered
data can then be returned directly on subsequent reads.
The constructor creates a ` Buffere... | |
Python_StringIO/2205_14_0.txt | Resources | |
Python_StringIO/1006_112_0.txt | well... at least we found out it's something between data.tostring() aka
__f[__c].tostring() and StringIO()
and not PIL even though it seemed like it :) | |
Python_StringIO/1006_186_0.txt | [

](/Tcll) | |
Python_StringIO/1006_48_0.txt | [ Sign up for GitHub ](/signup?return_to=%2Fpython-
pillow%2FPillow%2Fissues%2Fnew%2Fchoose) | |
Python_StringIO/775_93_0.txt | I wondered about ` sys.path ` which is why I suggested printing ` PIL.__file__
` , but that seemed to be correct. I don't think ` sys.path ` would affect the
location that PIL would search for ` libjpeg ` \- my understanding from a
brief look at the code is that it's a compile-time option and it uses the
standard dynam... | |
Python_StringIO/1006_141_0.txt |
tex0 is another image format, which I've supported already | |
Python_StringIO/1006_190_0.txt | **[ Tcll ](/Tcll) ** commented Nov 13, 2014 | |
Python_StringIO/1006_248_0.txt | [

](/Tcll) | |
Python_StringIO/2205_25_0.txt | Clear | |
Python_StringIO/2205_26_0.txt | [ Search syntax tips ](https://docs.github.com/search-github/github-code-
search/understanding-github-code-search-syntax) | |
Python_StringIO/1006_185_0.txt | Sorry, something went wrong. | |
Python_StringIO/1006_287_0.txt | the frontent vs backend access is what allows scripts to use little code when
it comes to file I/O
(scripts use shared libraries which can do more advanced things) | |
Python_StringIO/2205_1_0.txt | ## Navigation Menu | |
Python_StringIO/1006_322_0.txt | Author | |
Python_StringIO/25046pilhowreturnstr_54_0.txt | >> > "Christoph" wrote:
>
> image.save('test', 'JPEG')
> image=StringIO(image.????()) # what's the right method?
> return image
>
> Any hints? Thanx!
>
> file = StringIO()
> image.save(file, "JPEG")
> return file.getvalue()
>> | |
Python_StringIO/1006_98_0.txt | yea, this time I actually did the simple tests and they worked ;) | |
Python_StringIO/1006_39_0.txt | You signed in with another tab or window. [ Reload ]() to refresh your
session. You signed out in another tab or window. [ Reload ]() to refresh
your session. You switched accounts on another tab or window. [ Reload ]() to
refresh your session. Dismiss alert | |
Python_StringIO/1006_312_0.txt |
def preprocess_image(image, target_size):
if image.mode != 'RGB':
image = image.convert('RGB')
image = image.resize(target_size)
image = img_to_array(image)
image = np.expand_dims(image, axis=0) | |
Python_StringIO/2205_110_0.txt | 👍 10 snowman, banjin, EdgarACarneiro, roshanaz, SettNozz, mehmetboraezer,
allexiusw, kannes, cw4t, and fabiocaccamo reacted with thumbs up emoji 😄 1
snowman reacted with laugh emoji | |
Python_StringIO/25046pilhowreturnstr_121_0.txt | by: [ marktang ](https://bytes.com/profile/564145/marktang/) | last post by: | |
Python_StringIO/25046pilhowreturnstr_142_0.txt | [ 
](https://bytes.com/profile/125153/isladogs/) | |
Python_StringIO/1006_24_0.txt | Search | |
Python_StringIO/2205_130_0.txt | None yet | |
Python_StringIO/1006_115_0.txt | All reactions | |
Python_StringIO/1006_301_0.txt |
hope this helps. | |
Python_StringIO/1006_339_0.txt | Projects | |
Python_StringIO/1006_219_0.txt | From personal experience, I know how hard it is to change perspective on a
problem when you're dealing with autism. But you should really step back and
look for a way to approach this problem where the first problems you have
relate to images and not packaging. | |
Python_StringIO/25046pilhowreturnstr_1_0.txt | * [ Sign in ](/login/)
* [ Create Account ](/register/) | |
Python_StringIO/775_76_0.txt | interesting. I do agree that this most likely has something to do with the
specific account / environment then. Here's the output from the 'sanity
check': | |
Python_StringIO/1006_30_0.txt | Cancel Submit feedback | |
Python_StringIO/1006_41_0.txt | [ python-pillow ](/python-pillow) / **[ Pillow ](/python-pillow/Pillow) **
Public | |
Python_StringIO/775_108_0.txt | @nphole -- thanks for letting us know. That's all really strange, but I'm glad
it's sorted now. The only explanation I can think of is that there was a bug
in our last release, someone on the team here patched it on some but not all
of our servers and also on our development systems, and then yesterday's
release update... | |
Python_StringIO/1006_151_0.txt | importing Pikachu_eyesYellow.00.png 100% | |
Python_StringIO/25046pilhowreturnstr_48_0.txt | [ ](https://bytes.com/) | |
Python_StringIO/25046pilhowreturnstr_87_0.txt | [ Python ](https://bytes.com/topic/python/answers/) | |
Python_StringIO/2205_76_0.txt | The text was updated successfully, but these errors were encountered: | |
Python_StringIO/1006_144_0.txt |
^ this never showed before o.o | |
Python_StringIO/2205_34_0.txt | Query | |
Python_StringIO/1006_343_0.txt | Development | |
Python_StringIO/1006_174_0.txt | and I just realized I'm a dumb on one part
in IMG.py, I derped and put: | |
Python_StringIO/775_81_0.txt |
Also, in a Python shell, could you please run these commands and paste the
output: | |
Python_StringIO/1006_146_0.txt | here's my code for pillow.py: | |
Python_StringIO/25046pilhowreturnstr_2_0.txt | [  ](/) | |
Python_StringIO/775_60_0.txt | return serve_pil_image(img) | |
Python_StringIO/2205_10_0.txt | For | |
Python_StringIO/2205_64_0.txt | ### What did you do? | |
Python_StringIO/25046pilhowreturnstr_46_0.txt | Why not? Python is a block-structured language. New builtins can
arrive in any release. | |
Python_StringIO/25046pilhowreturnstr_13_0.txt | def modify_image(self, my_image):
from PIL import Image
from StringIO import StringIO | |
Python_StringIO/1006_154_0.txt | All reactions | |
Python_StringIO/1006_247_0.txt | Sorry, something went wrong. | |
Python_StringIO/775_67_0.txt | deleted-user-64250 | 10 posts | July 23, 2013, 11:56 a.m. | [ permalink
](https://www.pythonanywhere.com/forums/topic/775/#id_post_5543) | |
Python_StringIO/1006_270_0.txt | All reactions | |
Python_StringIO/2205_141_0.txt | ### Footer navigation | |
Python_StringIO/25046pilhowreturnstr_77_0.txt | [ Python ](https://bytes.com/topic/python/answers/) | |
Python_StringIO/1006_0_0.txt | Skip to content | |
Python_StringIO/25046pilhowreturnstr_84_0.txt | [ wxPython and PIL ](https://bytes.com/topic/python/answers/551782-wxpython-
pil) | |
Python_StringIO/1006_20_0.txt | * [ Topics ](https://github.com/topics)
* [ Trending ](https://github.com/trending)
* [ Collections ](https://github.com/collections) | |
Python_StringIO/25046pilhowreturnstr_38_0.txt | Jul 18 '05 # [ 4 ](https://bytes.com/topic/python/answers/25046-pil-how-
return-stringio-image#post94195 "permalink") | |
Python_StringIO/2205_143_0.txt | You can’t perform that action at this time. | |
Python_StringIO/1006_289_0.txt | --- | |
Python_StringIO/1006_204_0.txt | pillow.py: | |
Python_StringIO/25046pilhowreturnstr_122_0.txt | ONU (Optical Network Unit) is one of the key components for providing high-
speed Internet services. Its primary function is to act as an endpoint device
located at the user's premises. However,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.