-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Conversation
Hey @cbjazzguitar the entry is empty, could you please check that once? Thanks! 😃 |
Hmm I don’t understand why its empty
Attached is the file
Chris
On Jun 18, 2024, at 11:58 AM, Mamta Wardhani ***@***.***> wrote:
Hey @cbjazzguitar <https://github.com/cbjazzguitar> the entry is empty, could you please check that once? Thanks! 😃
—
Reply to this email directly, view it on GitHub <#4786 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/BIXOONRW5BX6F46YWX4DN5DZIBKKRAVCNFSM6AAAAABJOOEDB6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZWGQ2TENZZHA>.
You are receiving this because you were mentioned.

|
Hello!
I tried again and i think this time it worked!
Chris
… On Jun 18, 2024, at 1:29 PM, Chris Brown ***@***.***> wrote:
Hmm I don’t understand why its empty
Attached is the file
Chris
> On Jun 18, 2024, at 11:58 AM, Mamta Wardhani ***@***.***> wrote:
>
>
> Hey @cbjazzguitar <https://github.com/cbjazzguitar> the entry is empty, could you please check that once? Thanks! 😃
>
> —
> Reply to this email directly, view it on GitHub <#4786 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/BIXOONRW5BX6F46YWX4DN5DZIBKKRAVCNFSM6AAAAABJOOEDB6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZWGQ2TENZZHA>.
> You are receiving this because you were mentioned.
>
<imagefilter.md>
|
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.
Hi, I have suggested a few changes please modify
@@ -0,0 +1,58 @@ | |||
--- | |||
Title: ''.imagefilter()' |
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: ''.imagefilter()' | |
Title: 'ImageFilter' |
Subjects: | ||
- 'Code Foundations' | ||
- '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.
Remove line 7
@@ -0,0 +1,58 @@ | |||
--- | |||
Title: ''.imagefilter()' | |||
Description: 'the imagefilter() adds a filter to an image' |
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.
Description: 'the imagefilter() adds a filter to an image' | |
Description: 'Used to apply filters on an image' |
- 'Effects' | ||
- 'Filter' | ||
- 'Functions' | ||
- 'Images' | ||
- 'Methods' |
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.
- '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 |
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.
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) |
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.
ImageFilter(value1, value2, value3) | |
```pseudo | |
Image.filter(filter) |
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. |
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.
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. |
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) |
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.
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() |
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.
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. |
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.
This example would a dd a water filter to an image. | |
The code will show a blurred image. |
## 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) | ||
``` |
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.
Add the image and show how to apply the filter on that and remove the codebyte example as it will not run
Thank you for contributing to Codecademy docs, I have suggested a few changes please modify |
Hello
Changes updated
Chris
… On Jun 28, 2024, at 5:10 PM, shantanu ***@***.***> wrote:
Hi @cbjazzguitar <https://github.com/cbjazzguitar>
Thank you for contributing to Codecademy docs, I have suggested a few changes please modify
—
Reply to this email directly, view it on GitHub <#4786 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/BIXOONR25SDEVUQUJ7DDVP3ZJXGLJAVCNFSM6AAAAABJOOEDB6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJXGY3DIOJSGI>.
You are receiving this because you were mentioned.
|
@cigar-galaxy82 Please check this, I guess the author has made the changes you had requested. |
Please change the tags also @cigar-galaxy82 🙂 |
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 contributing to the Codecademy Docs @cbjazzguitar! The entry is well written 😃
I've suggested a few changes for this entry, could you review and modify those at your earliest convenience? Feel free to discuss any concers, thank you! 😄
--- | ||
Title: 'ImageFilter' | ||
Description: 'Used to apply filters on an image' | ||
Subjects: | ||
- 'Code Foundations' | ||
- 'Computer Science' | ||
Tags: | ||
- 'Computer Vision' | ||
- 'Effects' | ||
- 'Filter' | ||
- 'Images' | ||
- 'Pillow | ||
CatalogContent: | ||
- 'learn-python-3' | ||
- 'paths/computer-science' | ||
- 'paths/data-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: 'ImageFilter' | |
Description: 'Used to apply filters on an image' | |
Subjects: | |
- 'Code Foundations' | |
- 'Computer Science' | |
Tags: | |
- 'Computer Vision' | |
- 'Effects' | |
- 'Filter' | |
- 'Images' | |
- 'Pillow | |
CatalogContent: | |
- 'learn-python-3' | |
- 'paths/computer-science' | |
- 'paths/data-science' | |
--- | |
--- | |
Title: 'ImageFilter' | |
Description: 'Provides various image filters such as blur, contour, sharpen, and edge enhancement, allowing image enhancement and manipulation.' | |
Subjects: | |
- 'Code Foundations' | |
- 'Computer Science' | |
Tags: | |
- 'Computer Vision' | |
- 'Effects' | |
- 'Filter' | |
- 'Images' | |
- 'Pillow' | |
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.
Added a better description and ' for Pillow tag
- 'paths/data-science' | ||
--- | ||
|
||
The **ImageFilter** module helps add different filters to an image. This is used with the `image.filter()` method |
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.
Can we elaborate on this? Since this is a concept entry, you can talk more about this concept in depth.
## Syntax | ||
|
||
```pseudo | ||
Image.filter(filter) |
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.filter(filter) | |
from PIL import ImageFilter |
`filter`: A filter that will be applied to the image. | ||
|
||
## Example | ||
|
||
```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() | ||
|
||
The code will show a blurred image. | ||
|
||
image= Image.open(pexels-pixabay-349758.jpg) | ||
|
||
filtered_image = image.filter(ImageFilter.SHARPEN) | ||
|
||
filtered_image.save("pexels-pixabay-349758_blur.jpg") | ||
|
||
filtered_image.show() | ||
|
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.
`filter`: A filter that will be applied to the image. | |
## Example | |
```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() | |
The code will show a blurred image. | |
image= Image.open(pexels-pixabay-349758.jpg) | |
filtered_image = image.filter(ImageFilter.SHARPEN) | |
filtered_image.save("pexels-pixabay-349758_blur.jpg") | |
filtered_image.show() |
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.
Since this is a concept entry, an example is not needed here. We can just have the above syntax.
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 contributing @cbjazzguitar 😃
The entry is ready to be merged! 🚀
👋 @cbjazzguitar 🎉 Your contribution(s) can be seen here: https://www.codecademy.com/resources/docs/pillow/imagefilter Please note it may take a little while for changes to become visible. |
Description
Issue Solved
Type of Change
Checklist
main
branch.Issues Solved
section.