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

[Concept Entry] Python : ImageFilter() #4786

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

cbjazzguitar
Copy link

Description

  • added the ImageFilter() term for Python

Issue Solved

Type of Change

  • Adding a new entry
  • Editing an existing entry (fixing a typo, bug, issues, etc)
  • Updating the documentation

Checklist

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

@cigar-galaxy82 cigar-galaxy82 self-assigned this Jun 17, 2024
@mamtawardhani
Copy link
Collaborator

Hey @cbjazzguitar the entry is empty, could you please check that once? Thanks! 😃

@cbjazzguitar
Copy link
Author

cbjazzguitar commented Jun 18, 2024 via email

@cbjazzguitar
Copy link
Author

cbjazzguitar commented Jun 20, 2024 via email

@mamtawardhani mamtawardhani changed the title [Term Entry] Python : ImageFilter() [Concept Entry] Python : ImageFilter() Jun 28, 2024
@cigar-galaxy82 cigar-galaxy82 added python Python entries new entry New entry or entries status: under review Issue or PR is currently being reviewed pillow Python:Pillow entries labels Jun 28, 2024
Copy link
Collaborator

@cigar-galaxy82 cigar-galaxy82 left a comment

Choose a reason for hiding this comment

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

Hi, I have suggested a few changes please modify

@@ -0,0 +1,58 @@
---
Title: ''.imagefilter()'
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: ''.imagefilter()'
Title: 'ImageFilter'

Subjects:
- 'Code Foundations'
- '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.

Remove line 7

@@ -0,0 +1,58 @@
---
Title: ''.imagefilter()'
Description: 'the imagefilter() adds a filter to an image'
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
Description: 'the imagefilter() adds a filter to an image'
Description: 'Used to apply filters on an image'

Comment on lines 9 to 13
- 'Effects'
- 'Filter'
- 'Functions'
- 'Images'
- 'Methods'
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
- 'Effects'
- 'Filter'
- 'Functions'
- 'Images'
- 'Methods'
- 'Computer Vision'
- 'Effects'
- 'Filter'
- 'Images'
- 'Pillow'

- 'Functions'
- 'Images'
- 'Methods'
CatalogContent: # Please use course/path landing page slugs, rather than linking to individual content items. If listing multiple items, please put the most relevant one first
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
CatalogContent: # Please use course/path landing page slugs, rather than linking to individual content items. If listing multiple items, please put the most relevant one first
CatalogContent:


## Syntax

ImageFilter(value1, value2, value3)
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
ImageFilter(value1, value2, value3)
```pseudo
Image.filter(filter)

Comment on lines 25 to 29
The ImageFilter() function takes three parameters:

- 'value1' is required and is the image to perform on.
- 'value2' is the filter to be used.
- 'value3' parameters for the filter.
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
The ImageFilter() function takes three parameters:
- 'value1' is required and is the image to perform on.
- 'value2' is the filter to be used.
- 'value3' parameters for the filter.
- `filter`: A filter that will be applied to the image.

Comment on lines 33 to 41
water_image = imageOne("",400,300,"rgb", "blue");
filter = "water";
water_params = {
radius = 0,
wavelength = 5,
edgeAction = 7,
interpolation = bilinear
};
ImageFilter(image = water_image, filtername = filter, parameters = water_params)
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
water_image = imageOne("",400,300,"rgb", "blue");
filter = "water";
water_params = {
radius = 0,
wavelength = 5,
edgeAction = 7,
interpolation = bilinear
};
ImageFilter(image = water_image, filtername = filter, parameters = water_params)
```py
from PIL import Image, ImageFilter
# Open an image file
image = Image.open('example.jpg')
# Apply a filter to the image
filtered_image = image.filter(ImageFilter.SHARPEN)
# Save the filtered image
filtered_image.save("example_blur.jpg")
# show the filtered image
filtered_image.show()

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also, add an image and display

};
ImageFilter(image = water_image, filtername = filter, parameters = water_params)

This example would a dd a water filter to an image.
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
This example would a dd a water filter to an image.
The code will show a blurred image.

Comment on lines 45 to 58
## Codebyte Example (if applicable)


```codebyte/python
water_image = imageOne("",400,300,"rgb", "blue");
filter = "water";
water_params = {
radius = 0,
wavelength = 5,
edgeAction = 7,
interpolation = bilinear
};
ImageFilter(image = water_image, filtername = filter, parameters = water_params)
```
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add the image and show how to apply the filter on that and remove the codebyte example as it will not run

@cigar-galaxy82
Copy link
Collaborator

Hi @cbjazzguitar

Thank you for contributing to Codecademy docs, I have suggested a few changes please modify

@cbjazzguitar
Copy link
Author

cbjazzguitar commented Jun 28, 2024 via email

@mamtawardhani
Copy link
Collaborator

@cigar-galaxy82 Please check this, I guess the author has made the changes you had requested.

@mamtawardhani
Copy link
Collaborator

Please change the tags also @cigar-galaxy82 🙂

@ishg-153 ishg-153 linked an issue Jul 2, 2024 that may be closed by this pull request
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Concept Entry] Python Pillow - ImageFilter module
3 participants