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

[Term Entry] Pillow Image .convert() #4656

Merged
merged 10 commits into from
Jun 7, 2024

Conversation

ChiragAgg5k
Copy link
Contributor

@ChiragAgg5k ChiragAgg5k commented May 15, 2024

Description

Term entry for the Image.convert() method of the Pillow library.

Issue Solved

Closes #4623 .

Type of Change

  • Adding a new entry

Checklist

  • All writings are my own.
  • My entry follows the Codecademy Docs style guide.
  • My changes generate no new warnings.
  • I have performed a self-review of my own writing and code.
  • I have checked my entry and corrected any misspellings.
  • I have made corresponding changes to the documentation if needed.
  • I have confirmed my changes are not being pushed from my forked main branch.
  • I have confirmed that I'm pushing from a new branch named after the changes I'm making.
  • I have linked any issues that are relevant to this PR in the Issues Solved section.

@Sriparno08 Sriparno08 added new entry New entry or entries status: under review Issue or PR is currently being reviewed pillow Python:Pillow entries labels May 15, 2024
@Sriparno08 Sriparno08 self-assigned this May 15, 2024
Copy link
Collaborator

@Sriparno08 Sriparno08 left a 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:

content/pillow/concepts/image/terms/convert/convert.md Outdated Show resolved Hide resolved
content/pillow/concepts/image/terms/convert/convert.md Outdated Show resolved Hide resolved
content/pillow/concepts/image/terms/convert/convert.md Outdated Show resolved Hide resolved
content/pillow/concepts/image/terms/convert/convert.md Outdated Show resolved Hide resolved
content/pillow/concepts/image/terms/convert/convert.md Outdated Show resolved Hide resolved
content/pillow/concepts/image/terms/convert/convert.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@Sriparno08 Sriparno08 left a 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 👍

Copy link
Collaborator

@mamtawardhani mamtawardhani left a 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!

Comment on lines 1 to 14
---
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'
---
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
---
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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Image.convert(mode)
Image.convert(mode=None, matrix=None, dither=None, palette=0, ...)

Comment on lines 31 to 37
- `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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `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.

Copy link
Collaborator

@mamtawardhani mamtawardhani left a 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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> **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.

Copy link
Collaborator

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.

@mamtawardhani mamtawardhani merged commit 7a6f2b0 into Codecademy:main Jun 7, 2024
6 checks passed
Copy link

github-actions bot commented Jun 7, 2024

👋 @ChiragAgg5k
You have contributed to Codecademy Docs, and we would like to know more about you and your experience.
Please take a minute to fill out this four question survey to help us better understand Docs contributions and how we can improve the experience for you and our learners.
Thank you for your help!

🎉 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.
If you're appearing as anonymous and want to be credited, see here.

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.

[Term Entry] Python pillow .convert()
4 participants