-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[Term Entry] Pillow Image .convert() #4656
[Term Entry] Pillow Image .convert() #4656
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ChiragAgg5k, thanks for contributing to Codecademy!
I've listed all the modifications that you need to make in your entry below:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job, @ChiragAgg5k!
This looks good for a second review 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ChiragAgg5k! Thank you for contributing to the Codecademy Docs!
I've requested some suggestions in the entry, and I've also added some comments for the parameter description and the code, could you please check and modify those at your earliest convenience?
Thank you!
--- | ||
Title: '.convert()' | ||
Description: 'Converts an image from one mode to another.' | ||
Subjects: | ||
- 'Computer Science' | ||
- 'Data Visualization' | ||
Tags: | ||
- 'Pillow' | ||
- 'Methods' | ||
- 'Images' | ||
CatalogContent: | ||
- 'learn-python-3' | ||
- 'paths/computer-science' | ||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--- | |
Title: '.convert()' | |
Description: 'Converts an image from one mode to another.' | |
Subjects: | |
- 'Computer Science' | |
- 'Data Visualization' | |
Tags: | |
- 'Pillow' | |
- 'Methods' | |
- 'Images' | |
CatalogContent: | |
- 'learn-python-3' | |
- 'paths/computer-science' | |
--- | |
--- | |
Title: '.convert()' | |
Description: 'Converts an image from one mode to another.' | |
Subjects: | |
- 'Computer Science' | |
- 'Data Visualization' | |
Tags: | |
- 'Pillow' | |
- 'Methods' | |
- 'Images' | |
CatalogContent: | |
- 'learn-python-3' | |
- 'paths/computer-science'' | |
- 'paths/data-science' | |
- 'paths/data-science-foundations' | |
--- |
## Syntax | ||
|
||
```pseudo | ||
Image.convert(mode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Image.convert(mode) | |
Image.convert(mode=None, matrix=None, dither=None, palette=0, ...) |
- `L`: 8-bit pixels, black and white | ||
- `RGB`: 3x8-bit pixels, true color | ||
- `RGBA`: 4x8-bit pixels, true color with transparency mask | ||
- `CMYK`: 4x8-bit pixels, color separation | ||
- `YCbCr`: 3x8-bit pixels, color video format | ||
- `I`: 32-bit signed integer pixels | ||
- `F`: 32-bit floating point pixels |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `L`: 8-bit pixels, black and white | |
- `RGB`: 3x8-bit pixels, true color | |
- `RGBA`: 4x8-bit pixels, true color with transparency mask | |
- `CMYK`: 4x8-bit pixels, color separation | |
- `YCbCr`: 3x8-bit pixels, color video format | |
- `I`: 32-bit signed integer pixels | |
- `F`: 32-bit floating point pixels | |
- `L`: 8-bit grayscale, suitable for black and white images. | |
- `RGB`: 24-bit true color, ideal for full-color images. | |
- `RGBA`: 32-bit true color with transparency, for smooth blending. | |
- `CMYK`: 32-bit color separation, used in printing. | |
- `YCbCr`: 24-bit color video format, commonly used in video encoding. | |
- `I`: 32-bit signed integer, provides high precision. | |
- `F`: 32-bit floating point, offers accuracy and a wide dynamic range. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for making the required changes @ChiragAgg5k!
It will get merged soon, please do wait for the same 👍
- `dither`: Specifies the dithering method to use during conversion from mode `RGB` to `P` or from `RGB` or `L` to `1`. The default is `None`. This parameter is not used when a `matrix` is provided. | ||
- `palette`: The palette used when converting from mode `RGB` to `P`. | ||
|
||
> **Note**: The ellipsis (...) indicates that there can be additional optional parameters beyond those listed here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> **Note**: The ellipsis (...) indicates that there can be additional optional parameters beyond those listed here. | |
> Note: The ellipsis (...) indicates that there can be additional optional parameters beyond those listed here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed bold around the word "Note" as it is not a defined term.
👋 @ChiragAgg5k 🎉 Your contribution(s) can be seen here: https://www.codecademy.com/resources/docs/pillow/image/convert Please note it may take a little while for changes to become visible. |
Description
Term entry for the
Image.convert()
method of the Pillow library.Issue Solved
Closes #4623 .
Type of Change
Checklist
main
branch.Issues Solved
section.