Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new2 function to pildriver.py #2502

Closed
wants to merge 1 commit into from
Closed

Add new2 function to pildriver.py #2502

wants to merge 1 commit into from

Conversation

phuslu
Copy link

@phuslu phuslu commented May 5, 2017

Currently new function creates a grayscale image in stack, it will break paste a colorful(i.e. RGBA) image.

Repro Steps

pildriver.py save new.png paste open test1.png 0 200 paste open test2.png 0 0 new 400 400 0

We will get a grayscale new.png rather than a RGBA one.

This commit is to fix this by adding a new new2 function.

pildriver.py save new.png paste open test1.png 0 200 paste open test2.png 0 0 new2 RGBA 400 400 0

@phuslu phuslu changed the title Add new2 function Add new2 function to pildriver.py May 8, 2017
@wiredfool
Copy link
Member

wiredfool commented May 10, 2017

Looks like a good idea. I'd like a better name than new2, perhaps new_mode or something that gives a clue about what the difference is between new and new2.

It appears that we have no tests on pildriver (or likely, any of the scripts). It would be a good thing to add some tests to document that it's doing what we expect.

Currently `new` function creates a grayscale image in stack, it will break `paste` a colorful(i.e. `RGBA`) image.

Repro Steps
```
pildriver.py save new.png paste open test1.png 0 200 paste open test2.png 0 0 new 400 400 0
```
We will get a **grayscale**  new.png rather than a **RGBA** one.

This commit is to fix this by adding a new `new_mode` function.
```
pildriver.py save new.png paste open test1.png 0 200 paste open test2.png 0 0 new2 RGBA 400 400 0
```
@hugovk
Copy link
Member

hugovk commented Dec 27, 2017

Closing this as these scripts now live in their own repo at https://github.com/python-pillow/pillow-scripts.

PRs welcome over there.

@hugovk hugovk closed this Dec 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants