SlideShare une entreprise Scribd logo
1  sur  1
Télécharger pour lire hors ligne
Lab 9 - Assignment Specifications Maximum: 25 marks ram 1: Fix the file (25 marks) Write a
program to change picture colors according to the following criteria: - Your program
"L9Q1initials.py" must start with a commented academic integrity pledge, ID Box, and program
purpose. EACH function in your program must state its purpose in comments. Ensure you group
your code into logical blocks and use comments to explain each block. Coding style is important!
- Only the Image class must be imported. ImageDraw is not permitted in this program. - The
main function in your program should be named: fix_filelfile_name) When the main function is
called from the command line, the actual file to use must the program using the file
'stop_colored.png' (provided on-line). When the main function is properly called, the program
should: (a) open the file_name indicated to obtain a picture, (b) call the helper functions: fix
middle (picture) fidop_half (picture) cmake_rect_varyh (picture) (explained next), (c) show only
the final picture to verify the changes, (d) (optional) save the final picture as 'final.png'
(excluding the quotes). - The function fix_middle (picture) will return the changed picture after:
swapping the red and green components in the middle of the picture. The middle is defined as a
rectangular space 100% of the picture height and 50% of the picture width centered horizontally.
changing each pure yellow pixel on the top half of the image to white. Pure yellow pixels have
the red and green components maximized and the blue component minimized. Do not modify
any other pixels. - The function make_rect_varyh (picture) will return the changed picture after
making a rectangle meeting the following criteria: Rectangle upper left corner: ( 10% of the
picture width, 70% of the picture height) Rectangle height: 5% of the picture height Rectangle
width: 80% of the picture width Rectangle color varies from black to pure blue as the rectangle is
traversed horizontally from left to right. Do not modify any other pixels. 1

Contenu connexe

Similaire à Lab 9 Assignment - Fix file colors and add varying rectangle

Practical ActivitiesWeek06lab08-1.pngPractical Activities.docx
Practical ActivitiesWeek06lab08-1.pngPractical Activities.docxPractical ActivitiesWeek06lab08-1.pngPractical Activities.docx
Practical ActivitiesWeek06lab08-1.pngPractical Activities.docxChantellPantoja184
 
I need an explanation on what the function of the number 1.428 in .pdf
I need an explanation on what the function of the number 1.428 in .pdfI need an explanation on what the function of the number 1.428 in .pdf
I need an explanation on what the function of the number 1.428 in .pdfpratyushraj61
 
Presentation on Adobe Photoshop
Presentation on Adobe PhotoshopPresentation on Adobe Photoshop
Presentation on Adobe PhotoshopMohak Jain
 
CE344L-200365-Lab7.pdf
CE344L-200365-Lab7.pdfCE344L-200365-Lab7.pdf
CE344L-200365-Lab7.pdfUmarMustafa13
 
Custom Material Boen 04 2009
Custom Material Boen 04 2009Custom Material Boen 04 2009
Custom Material Boen 04 2009Jake Boen
 
1 of 6 LAB 5 IMAGE FILTERING ECE180 Introduction to.docx
1 of 6  LAB 5 IMAGE FILTERING ECE180 Introduction to.docx1 of 6  LAB 5 IMAGE FILTERING ECE180 Introduction to.docx
1 of 6 LAB 5 IMAGE FILTERING ECE180 Introduction to.docxmercysuttle
 
Image enhancement lecture
Image enhancement lectureImage enhancement lecture
Image enhancement lectureISRAR HUSSAIN
 
A graphic library and an application for simple curve manipolation
A graphic library and an application for simple curve manipolationA graphic library and an application for simple curve manipolation
A graphic library and an application for simple curve manipolationgraphitech
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image ProcessingAnkur Nanda
 
The Effectiveness and Efficiency of Medical Images after Special Filtration f...
The Effectiveness and Efficiency of Medical Images after Special Filtration f...The Effectiveness and Efficiency of Medical Images after Special Filtration f...
The Effectiveness and Efficiency of Medical Images after Special Filtration f...Editor IJCATR
 
Image processing using matlab
Image processing using matlabImage processing using matlab
Image processing using matlabdedik dafiyanto
 
Ecognition object base image classifications bangladesh
Ecognition object base image classifications bangladeshEcognition object base image classifications bangladesh
Ecognition object base image classifications bangladeshCresencio Turpo
 
International Journal of Computational Engineering Research(IJCER)
 International Journal of Computational Engineering Research(IJCER)  International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER) ijceronline
 
Xy rectify tip_sheet
Xy rectify tip_sheetXy rectify tip_sheet
Xy rectify tip_sheetEdu Gai-jien
 

Similaire à Lab 9 Assignment - Fix file colors and add varying rectangle (20)

Maya
MayaMaya
Maya
 
Practical ActivitiesWeek06lab08-1.pngPractical Activities.docx
Practical ActivitiesWeek06lab08-1.pngPractical Activities.docxPractical ActivitiesWeek06lab08-1.pngPractical Activities.docx
Practical ActivitiesWeek06lab08-1.pngPractical Activities.docx
 
I need an explanation on what the function of the number 1.428 in .pdf
I need an explanation on what the function of the number 1.428 in .pdfI need an explanation on what the function of the number 1.428 in .pdf
I need an explanation on what the function of the number 1.428 in .pdf
 
Luminance hdr
Luminance hdrLuminance hdr
Luminance hdr
 
Image inpainting
Image inpaintingImage inpainting
Image inpainting
 
Presentation on Adobe Photoshop
Presentation on Adobe PhotoshopPresentation on Adobe Photoshop
Presentation on Adobe Photoshop
 
CE344L-200365-Lab7.pdf
CE344L-200365-Lab7.pdfCE344L-200365-Lab7.pdf
CE344L-200365-Lab7.pdf
 
Custom Material Boen 04 2009
Custom Material Boen 04 2009Custom Material Boen 04 2009
Custom Material Boen 04 2009
 
Topic 1_PPT.pptx
Topic 1_PPT.pptxTopic 1_PPT.pptx
Topic 1_PPT.pptx
 
1 of 6 LAB 5 IMAGE FILTERING ECE180 Introduction to.docx
1 of 6  LAB 5 IMAGE FILTERING ECE180 Introduction to.docx1 of 6  LAB 5 IMAGE FILTERING ECE180 Introduction to.docx
1 of 6 LAB 5 IMAGE FILTERING ECE180 Introduction to.docx
 
Task 3
Task 3Task 3
Task 3
 
Image enhancement lecture
Image enhancement lectureImage enhancement lecture
Image enhancement lecture
 
A graphic library and an application for simple curve manipolation
A graphic library and an application for simple curve manipolationA graphic library and an application for simple curve manipolation
A graphic library and an application for simple curve manipolation
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
The Effectiveness and Efficiency of Medical Images after Special Filtration f...
The Effectiveness and Efficiency of Medical Images after Special Filtration f...The Effectiveness and Efficiency of Medical Images after Special Filtration f...
The Effectiveness and Efficiency of Medical Images after Special Filtration f...
 
Image processing using matlab
Image processing using matlabImage processing using matlab
Image processing using matlab
 
Ecognition object base image classifications bangladesh
Ecognition object base image classifications bangladeshEcognition object base image classifications bangladesh
Ecognition object base image classifications bangladesh
 
Matlab dip
Matlab dipMatlab dip
Matlab dip
 
International Journal of Computational Engineering Research(IJCER)
 International Journal of Computational Engineering Research(IJCER)  International Journal of Computational Engineering Research(IJCER)
International Journal of Computational Engineering Research(IJCER)
 
Xy rectify tip_sheet
Xy rectify tip_sheetXy rectify tip_sheet
Xy rectify tip_sheet
 

Plus de ALANKARSTEELINDUSTRI

Instructions Round your answers to the nearest whole number. a. Tota.pdf
 Instructions Round your answers to the nearest whole number. a. Tota.pdf Instructions Round your answers to the nearest whole number. a. Tota.pdf
Instructions Round your answers to the nearest whole number. a. Tota.pdfALANKARSTEELINDUSTRI
 
In XYZ company, employees are categorized by their job responsibili.pdf
 In XYZ company, employees are categorized by their job responsibili.pdf In XYZ company, employees are categorized by their job responsibili.pdf
In XYZ company, employees are categorized by their job responsibili.pdfALANKARSTEELINDUSTRI
 
In this procedure, youll trace the pathway of lymph flow from the st.pdf
 In this procedure, youll trace the pathway of lymph flow from the st.pdf In this procedure, youll trace the pathway of lymph flow from the st.pdf
In this procedure, youll trace the pathway of lymph flow from the st.pdfALANKARSTEELINDUSTRI
 
In the Solow growth model, the steady-state level of output per (effe.pdf
 In the Solow growth model, the steady-state level of output per (effe.pdf In the Solow growth model, the steady-state level of output per (effe.pdf
In the Solow growth model, the steady-state level of output per (effe.pdfALANKARSTEELINDUSTRI
 
In what ways did Volkswagen fulfill the requirements of effective cor.pdf
 In what ways did Volkswagen fulfill the requirements of effective cor.pdf In what ways did Volkswagen fulfill the requirements of effective cor.pdf
In what ways did Volkswagen fulfill the requirements of effective cor.pdfALANKARSTEELINDUSTRI
 
Incremental internationalization includes all of the following in det.pdf
 Incremental internationalization includes all of the following in det.pdf Incremental internationalization includes all of the following in det.pdf
Incremental internationalization includes all of the following in det.pdfALANKARSTEELINDUSTRI
 
In which of these circumstances is it advisable to use a POST request.pdf
 In which of these circumstances is it advisable to use a POST request.pdf In which of these circumstances is it advisable to use a POST request.pdf
In which of these circumstances is it advisable to use a POST request.pdfALANKARSTEELINDUSTRI
 
Input instructions values should be inputted using a Standard Englis.pdf
 Input instructions values should be inputted using a Standard Englis.pdf Input instructions values should be inputted using a Standard Englis.pdf
Input instructions values should be inputted using a Standard Englis.pdfALANKARSTEELINDUSTRI
 
Inorganic phosphorous is a naturally occurring element in all plants .pdf
 Inorganic phosphorous is a naturally occurring element in all plants .pdf Inorganic phosphorous is a naturally occurring element in all plants .pdf
Inorganic phosphorous is a naturally occurring element in all plants .pdfALANKARSTEELINDUSTRI
 
information flows within your job. Find out 1. the chart of accounts.pdf
 information flows within your job. Find out 1. the chart of accounts.pdf information flows within your job. Find out 1. the chart of accounts.pdf
information flows within your job. Find out 1. the chart of accounts.pdfALANKARSTEELINDUSTRI
 
Information about light in the outside world is used to tune the brai.pdf
 Information about light in the outside world is used to tune the brai.pdf Information about light in the outside world is used to tune the brai.pdf
Information about light in the outside world is used to tune the brai.pdfALANKARSTEELINDUSTRI
 
Infection control 16. Chain of infection 17. Factors that increase ho.pdf
 Infection control 16. Chain of infection 17. Factors that increase ho.pdf Infection control 16. Chain of infection 17. Factors that increase ho.pdf
Infection control 16. Chain of infection 17. Factors that increase ho.pdfALANKARSTEELINDUSTRI
 
In the textbook, you leamed about Hopi Hoekstra and colleagues who we.pdf
 In the textbook, you leamed about Hopi Hoekstra and colleagues who we.pdf In the textbook, you leamed about Hopi Hoekstra and colleagues who we.pdf
In the textbook, you leamed about Hopi Hoekstra and colleagues who we.pdfALANKARSTEELINDUSTRI
 
Larger raindrops fall than smaller raindrops. slower faster Questio.pdf
 Larger raindrops fall than smaller raindrops. slower faster Questio.pdf Larger raindrops fall than smaller raindrops. slower faster Questio.pdf
Larger raindrops fall than smaller raindrops. slower faster Questio.pdfALANKARSTEELINDUSTRI
 
L0 254 P4-41A. (Learning Objectives 2, 4 Aggregating information for.pdf
 L0 254 P4-41A. (Learning Objectives 2, 4 Aggregating information for.pdf L0 254 P4-41A. (Learning Objectives 2, 4 Aggregating information for.pdf
L0 254 P4-41A. (Learning Objectives 2, 4 Aggregating information for.pdfALANKARSTEELINDUSTRI
 
Kozmo y Webvan eran dos servicios de entrega en l�nea que se decl.pdf
 Kozmo y Webvan eran dos servicios de entrega en l�nea que se decl.pdf Kozmo y Webvan eran dos servicios de entrega en l�nea que se decl.pdf
Kozmo y Webvan eran dos servicios de entrega en l�nea que se decl.pdfALANKARSTEELINDUSTRI
 
Komal borrows $14,000 from her father to open her accounting practice.pdf
 Komal borrows $14,000 from her father to open her accounting practice.pdf Komal borrows $14,000 from her father to open her accounting practice.pdf
Komal borrows $14,000 from her father to open her accounting practice.pdfALANKARSTEELINDUSTRI
 
kites at filowi Corphite pets fa) Prough (4) Trepicutily ifou in nite.pdf
 kites at filowi Corphite pets fa) Prough (4) Trepicutily ifou in nite.pdf kites at filowi Corphite pets fa) Prough (4) Trepicutily ifou in nite.pdf
kites at filowi Corphite pets fa) Prough (4) Trepicutily ifou in nite.pdfALANKARSTEELINDUSTRI
 
Kingbird Co. has the following defined benefit pension plan balances .pdf
 Kingbird Co. has the following defined benefit pension plan balances .pdf Kingbird Co. has the following defined benefit pension plan balances .pdf
Kingbird Co. has the following defined benefit pension plan balances .pdfALANKARSTEELINDUSTRI
 
Kara categorized her spending for this month into four categories Re.pdf
 Kara categorized her spending for this month into four categories Re.pdf Kara categorized her spending for this month into four categories Re.pdf
Kara categorized her spending for this month into four categories Re.pdfALANKARSTEELINDUSTRI
 

Plus de ALANKARSTEELINDUSTRI (20)

Instructions Round your answers to the nearest whole number. a. Tota.pdf
 Instructions Round your answers to the nearest whole number. a. Tota.pdf Instructions Round your answers to the nearest whole number. a. Tota.pdf
Instructions Round your answers to the nearest whole number. a. Tota.pdf
 
In XYZ company, employees are categorized by their job responsibili.pdf
 In XYZ company, employees are categorized by their job responsibili.pdf In XYZ company, employees are categorized by their job responsibili.pdf
In XYZ company, employees are categorized by their job responsibili.pdf
 
In this procedure, youll trace the pathway of lymph flow from the st.pdf
 In this procedure, youll trace the pathway of lymph flow from the st.pdf In this procedure, youll trace the pathway of lymph flow from the st.pdf
In this procedure, youll trace the pathway of lymph flow from the st.pdf
 
In the Solow growth model, the steady-state level of output per (effe.pdf
 In the Solow growth model, the steady-state level of output per (effe.pdf In the Solow growth model, the steady-state level of output per (effe.pdf
In the Solow growth model, the steady-state level of output per (effe.pdf
 
In what ways did Volkswagen fulfill the requirements of effective cor.pdf
 In what ways did Volkswagen fulfill the requirements of effective cor.pdf In what ways did Volkswagen fulfill the requirements of effective cor.pdf
In what ways did Volkswagen fulfill the requirements of effective cor.pdf
 
Incremental internationalization includes all of the following in det.pdf
 Incremental internationalization includes all of the following in det.pdf Incremental internationalization includes all of the following in det.pdf
Incremental internationalization includes all of the following in det.pdf
 
In which of these circumstances is it advisable to use a POST request.pdf
 In which of these circumstances is it advisable to use a POST request.pdf In which of these circumstances is it advisable to use a POST request.pdf
In which of these circumstances is it advisable to use a POST request.pdf
 
Input instructions values should be inputted using a Standard Englis.pdf
 Input instructions values should be inputted using a Standard Englis.pdf Input instructions values should be inputted using a Standard Englis.pdf
Input instructions values should be inputted using a Standard Englis.pdf
 
Inorganic phosphorous is a naturally occurring element in all plants .pdf
 Inorganic phosphorous is a naturally occurring element in all plants .pdf Inorganic phosphorous is a naturally occurring element in all plants .pdf
Inorganic phosphorous is a naturally occurring element in all plants .pdf
 
information flows within your job. Find out 1. the chart of accounts.pdf
 information flows within your job. Find out 1. the chart of accounts.pdf information flows within your job. Find out 1. the chart of accounts.pdf
information flows within your job. Find out 1. the chart of accounts.pdf
 
Information about light in the outside world is used to tune the brai.pdf
 Information about light in the outside world is used to tune the brai.pdf Information about light in the outside world is used to tune the brai.pdf
Information about light in the outside world is used to tune the brai.pdf
 
Infection control 16. Chain of infection 17. Factors that increase ho.pdf
 Infection control 16. Chain of infection 17. Factors that increase ho.pdf Infection control 16. Chain of infection 17. Factors that increase ho.pdf
Infection control 16. Chain of infection 17. Factors that increase ho.pdf
 
In the textbook, you leamed about Hopi Hoekstra and colleagues who we.pdf
 In the textbook, you leamed about Hopi Hoekstra and colleagues who we.pdf In the textbook, you leamed about Hopi Hoekstra and colleagues who we.pdf
In the textbook, you leamed about Hopi Hoekstra and colleagues who we.pdf
 
Larger raindrops fall than smaller raindrops. slower faster Questio.pdf
 Larger raindrops fall than smaller raindrops. slower faster Questio.pdf Larger raindrops fall than smaller raindrops. slower faster Questio.pdf
Larger raindrops fall than smaller raindrops. slower faster Questio.pdf
 
L0 254 P4-41A. (Learning Objectives 2, 4 Aggregating information for.pdf
 L0 254 P4-41A. (Learning Objectives 2, 4 Aggregating information for.pdf L0 254 P4-41A. (Learning Objectives 2, 4 Aggregating information for.pdf
L0 254 P4-41A. (Learning Objectives 2, 4 Aggregating information for.pdf
 
Kozmo y Webvan eran dos servicios de entrega en l�nea que se decl.pdf
 Kozmo y Webvan eran dos servicios de entrega en l�nea que se decl.pdf Kozmo y Webvan eran dos servicios de entrega en l�nea que se decl.pdf
Kozmo y Webvan eran dos servicios de entrega en l�nea que se decl.pdf
 
Komal borrows $14,000 from her father to open her accounting practice.pdf
 Komal borrows $14,000 from her father to open her accounting practice.pdf Komal borrows $14,000 from her father to open her accounting practice.pdf
Komal borrows $14,000 from her father to open her accounting practice.pdf
 
kites at filowi Corphite pets fa) Prough (4) Trepicutily ifou in nite.pdf
 kites at filowi Corphite pets fa) Prough (4) Trepicutily ifou in nite.pdf kites at filowi Corphite pets fa) Prough (4) Trepicutily ifou in nite.pdf
kites at filowi Corphite pets fa) Prough (4) Trepicutily ifou in nite.pdf
 
Kingbird Co. has the following defined benefit pension plan balances .pdf
 Kingbird Co. has the following defined benefit pension plan balances .pdf Kingbird Co. has the following defined benefit pension plan balances .pdf
Kingbird Co. has the following defined benefit pension plan balances .pdf
 
Kara categorized her spending for this month into four categories Re.pdf
 Kara categorized her spending for this month into four categories Re.pdf Kara categorized her spending for this month into four categories Re.pdf
Kara categorized her spending for this month into four categories Re.pdf
 

Dernier

Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 

Dernier (20)

Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 

Lab 9 Assignment - Fix file colors and add varying rectangle

  • 1. Lab 9 - Assignment Specifications Maximum: 25 marks ram 1: Fix the file (25 marks) Write a program to change picture colors according to the following criteria: - Your program "L9Q1initials.py" must start with a commented academic integrity pledge, ID Box, and program purpose. EACH function in your program must state its purpose in comments. Ensure you group your code into logical blocks and use comments to explain each block. Coding style is important! - Only the Image class must be imported. ImageDraw is not permitted in this program. - The main function in your program should be named: fix_filelfile_name) When the main function is called from the command line, the actual file to use must the program using the file 'stop_colored.png' (provided on-line). When the main function is properly called, the program should: (a) open the file_name indicated to obtain a picture, (b) call the helper functions: fix middle (picture) fidop_half (picture) cmake_rect_varyh (picture) (explained next), (c) show only the final picture to verify the changes, (d) (optional) save the final picture as 'final.png' (excluding the quotes). - The function fix_middle (picture) will return the changed picture after: swapping the red and green components in the middle of the picture. The middle is defined as a rectangular space 100% of the picture height and 50% of the picture width centered horizontally. changing each pure yellow pixel on the top half of the image to white. Pure yellow pixels have the red and green components maximized and the blue component minimized. Do not modify any other pixels. - The function make_rect_varyh (picture) will return the changed picture after making a rectangle meeting the following criteria: Rectangle upper left corner: ( 10% of the picture width, 70% of the picture height) Rectangle height: 5% of the picture height Rectangle width: 80% of the picture width Rectangle color varies from black to pure blue as the rectangle is traversed horizontally from left to right. Do not modify any other pixels. 1