Comments (11)
Thank you! I'll try to get this into the upcoming 2.0 release.
from pillow.
Can you send a pull request?
from pillow.
I probably can but I need to convert my fork to Git then put it on my Github account. Unfortunately, right now, I don't have time to do this.
I did a patch that you can access here: https://gist.github.com/etienned/5101740
Let me know if it works or if you really need a pull request.
from pillow.
Thanks. I get:
aclark@Alexs-MacBook-Pro:~/Developer/python-imaging/Pillow/ > patch -p1 < t.diff
patching file PIL/JpegImagePlugin.py
Hunk #1 FAILED at 39.
Hunk #2 succeeded at 428 (offset -7 lines).
Hunk #3 succeeded at 445 with fuzz 2 (offset -7 lines).
Hunk #4 succeeded at 511 with fuzz 2 (offset -7 lines).
1 out of 4 hunks FAILED -- saving rejects to file PIL/JpegImagePlugin.py.rej
patching file encode.c
Hunk #1 succeeded at 506 (offset -59 lines).
Hunk #2 FAILED at 571.
Hunk #3 succeeded at 592 with fuzz 2 (offset -54 lines).
Hunk #4 succeeded at 615 (offset -45 lines).
1 out of 4 hunks FAILED -- saving rejects to file encode.c.rej
patching file libImaging/Jpeg.h
patching file libImaging/JpegEncode.c
Hunk #1 FAILED at 146.
1 out of 1 hunk FAILED -- saving rejects to file libImaging/JpegEncode.c.rej
patching file PIL/JpegImagePlugin.py
Hunk #1 succeeded at 416 (offset -8 lines).
Hunk #2 succeeded at 436 (offset -8 lines).
Hunk #3 succeeded at 455 (offset -8 lines).
Hunk #4 succeeded at 462 (offset -8 lines).
Hunk #5 succeeded at 474 with fuzz 1 (offset -8 lines).
Hunk #6 succeeded at 522 (offset -8 lines).
patching file encode.c
Hunk #1 succeeded at 512 (offset -59 lines).
Hunk #2 succeeded at 629 (offset -47 lines).
patching file libImaging/JpegEncode.c
Hunk #1 FAILED at 143.
1 out of 1 hunk FAILED -- saving rejects to file libImaging/JpegEncode.c.rej
patching file PIL/JpegImagePlugin.py
Hunk #1 FAILED at 37.
Hunk #2 succeeded at 448 (offset -8 lines).
Hunk #3 succeeded at 490 (offset -8 lines).
Hunk #4 succeeded at 501 (offset -8 lines).
1 out of 4 hunks FAILED -- saving rejects to file PIL/JpegImagePlugin.py.rej
patching file PIL/JpegPresets.py
patching file encode.c
Hunk #1 succeeded at 523 (offset -59 lines).
Hunk #2 succeeded at 531 (offset -59 lines).
Hunk #3 succeeded at 549 (offset -59 lines).
patching file PIL/JpegImagePlugin.py
Hunk #1 FAILED at 37.
1 out of 1 hunk FAILED -- saving rejects to file PIL/JpegImagePlugin.py.rej
patching file PIL/JpegImagePlugin.py
Hunk #1 succeeded at 450 (offset -9 lines).
Hunk #2 succeeded at 475 (offset -9 lines).
Hunk #3 succeeded at 511 (offset -9 lines).
patching file PIL/JpegPresets.py
patching file PIL/JpegImagePlugin.py
Hunk #1 succeeded at 425 (offset -9 lines).
Hunk #2 succeeded at 473 (offset -9 lines).
Hunk #3 succeeded at 482 (offset -9 lines).
Hunk #4 succeeded at 497 (offset -9 lines).
patching file PIL/JpegPresets.py
patching file encode.c
Hunk #1 succeeded at 531 (offset -59 lines).
Hunk #2 succeeded at 550 (offset -59 lines).
So maybe some stuff has changed since you made your changes…
from pillow.
OK, there's some changes between my version and Pillow version, mostly stuff related to raw.
So I forked Pillow and updated it with my code. In general it was pretty simple and straightforward. There's only one place where I'm not sure if the merge I done is correct. It's line 593 in encode.c. In my previous version the diff of this line was:
- if (!PyArg_ParseTuple(args, ARG("ss|iiiiiiiis#", "ss|iiiiiiiiy#"),
+ if (!PyArg_ParseTuple(args, ARG("ss|iiiiiiiiOs#", "ss|iiiiiiiiOy#"),
At the moment I don't remember how this ARG stuff is supposed to work. I still don't have time to search that and test my changes to Pillow (I was not supposed to put some time on Pillow at all today...).
So do you want to test it or wait that I test it? If you want to test it I will send you a pull request.
from pillow.
Please send a pull request and I or someone else will test, thanks! Also if you can easily add some general testing instructions to the pull request, please do. E.g. verify call to ARG, etc.
from pillow.
@etienned line 593 looks correct
from pillow.
OK so just waiting for pull request I guess
from pillow.
Pull request sent.
from pillow.
@etienned Can you send me the URL? I can't find it…
from pillow.
Never mind, I merged it, thanks!
from pillow.
Related Issues (20)
- Question about license identifier HOT 5
- Empty JPEG2000 image after upgrading from 10.2.0 to 10.3.0 HOT 5
- fontfamily (font1 (include some chars)+font2(include most chars)) cannot show some characters HOT 1
- Error: cannot import name '_imagingft' HOT 11
- JPEG image has wrong size HOT 2
- ImageSequence encounters an exception when JPEG pixels exceed 4096*4096 HOT 2
- `ImageMath.eval` deprecation warning running `selftest.py` HOT 1
- Memory leak when opening images HOT 3
- Add small number of carefully curated screenshots to handbook tutorial HOT 4
- KeyError: 'setting text direction, language or font features is not supported without libraqm' HOT 3
- Wrong JPEG library version: library is 90, caller expects 80 HOT 2
- BGR;15/16 scaling HOT 7
- Can't install Pillow on Ubuntu HOT 13
- Unable to open AVIF images HOT 1
- Channel data read incorrectly from uncompressed .dds HOT 6
- Unknown test comment HOT 6
- cannot identify image file (PNG file from scanner) HOT 19
- toqpixmap() doesn't work with PyQt5 HOT 6
- Grayscale PNG converted with standard tool to 8-bit grayscale TIFF won't load HOT 4
- GIFs saving with unexpected transparency (or perhaps undefined pixels?) HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pillow.