{"id":1338,"date":"2022-10-14T11:12:24","date_gmt":"2022-10-14T11:12:24","guid":{"rendered":"http:\/\/learnlearn.uk\/python\/?page_id=1338"},"modified":"2022-10-14T11:31:59","modified_gmt":"2022-10-14T11:31:59","slug":"python-image-editing-challenges","status":"publish","type":"page","link":"https:\/\/learnlearn.uk\/python\/python-image-editing-challenges\/","title":{"rendered":"Python Image Editing Challenges"},"content":{"rendered":"<div class=\"responsive-tabs\">\n<h2 class=\"tabtitle\">Example Code<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Example Code<\/h3>\n<p>Here is some example code to help you get started!<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #f8f8f8; overflow: auto; width: auto; border: solid gray; border-width: .1em .1em .1em .8em; padding: .2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #aa22ff; font-weight: bold;\">from<\/span> <span style=\"color: #0000ff; font-weight: bold;\">PIL<\/span> <span style=\"color: #aa22ff; font-weight: bold;\">import<\/span> Image\r\n\r\nim <span style=\"color: #666666;\">=<\/span> Image<span style=\"color: #666666;\">.<\/span>open(<span style=\"color: #bb4444;\">'cat.jpg'<\/span>)\r\nim2 <span style=\"color: #666666;\">=<\/span> im<span style=\"color: #666666;\">.<\/span>resize((<span style=\"color: #666666;\">400<\/span>,<span style=\"color: #666666;\">300<\/span>),Image<span style=\"color: #666666;\">.<\/span>LANCZOS) <span style=\"color: #008800; font-style: italic;\">#create a smaller copy<\/span>\r\nim2<span style=\"color: #666666;\">.<\/span>save(<span style=\"color: #bb4444;\">'resize.jpg'<\/span>)\r\n<span style=\"color: #aa22ff; font-weight: bold;\">for<\/span> x <span style=\"color: #aa22ff; font-weight: bold;\">in<\/span> <span style=\"color: #aa22ff;\">range<\/span>(im2<span style=\"color: #666666;\">.<\/span>width):\r\n    <span style=\"color: #aa22ff; font-weight: bold;\">for<\/span> y <span style=\"color: #aa22ff; font-weight: bold;\">in<\/span> <span style=\"color: #aa22ff;\">range<\/span>(im2<span style=\"color: #666666;\">.<\/span>height):\r\n        r,g,b <span style=\"color: #666666;\">=<\/span> im2<span style=\"color: #666666;\">.<\/span>getpixel((x,y))\r\n        r <span style=\"color: #666666;\">=<\/span> r <span style=\"color: #666666;\">+<\/span> <span style=\"color: #666666;\">30<\/span>\r\n        g <span style=\"color: #666666;\">=<\/span> g <span style=\"color: #666666;\">+<\/span> <span style=\"color: #666666;\">30<\/span>\r\n        b <span style=\"color: #666666;\">=<\/span> b <span style=\"color: #666666;\">+<\/span> <span style=\"color: #666666;\">30<\/span>\r\n        \r\n        im2<span style=\"color: #666666;\">.<\/span>putpixel((x, y), (r, g, b))\r\n\r\nim2<span style=\"color: #666666;\">.<\/span>save(<span style=\"color: #bb4444;\">'lighter.jpg'<\/span>)\r\n<\/pre>\n<\/div>\n\n<\/div><h2 class=\"tabtitle\">Original<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Original Image<\/h3>\n<p>Here is the original image I will be working with so that you can compare the results.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-1354\" src=\"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/cat.jpg\" alt=\"\" width=\"827\" height=\"620\" srcset=\"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/cat.jpg 1600w, https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/cat-300x225.jpg 300w, https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/cat-768x576.jpg 768w, https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/cat-1024x768.jpg 1024w\" sizes=\"(max-width: 827px) 100vw, 827px\" \/><\/p>\n\n<\/div><h2 class=\"tabtitle\">Challenge 1<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Challenge 1 &#8211; Darker<\/h3>\n<p>Create a program that makes your image darker rather than lighter and saves the image as darker.jpg.<\/p>\n<p><strong>Result:<\/strong><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1352\" src=\"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/darker.jpg\" alt=\"\" width=\"400\" height=\"300\" srcset=\"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/darker.jpg 400w, https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/darker-300x225.jpg 300w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/p>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">2<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Challenge 2 &#8211; Grayscale<\/h3>\n<p><span style=\"font-weight: 400;\">Create a program that converts the image to grayscale and saves it as &#8216;grayscale.jpg&#8217;<\/span><\/p>\n<p><strong>Result:<\/strong><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1340\" src=\"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/grayscale.jpg\" alt=\"\" width=\"400\" height=\"300\" srcset=\"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/grayscale.jpg 400w, https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/grayscale-300x225.jpg 300w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/p>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">3<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Challenge 3 &#8211; B&amp;W<\/h3>\n<p><span style=\"font-weight: 400;\">Create a program that converts the image to pure black and white and saves it as &#8216;bw.jpg&#8217;.<\/span><\/p>\n<p><strong>Result:<\/strong><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1341\" src=\"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/bw.jpg\" alt=\"\" width=\"400\" height=\"300\" srcset=\"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/bw.jpg 400w, https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/bw-300x225.jpg 300w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">4<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Challenge 4 &#8211; Invertor<\/h3>\n<p>Create a program that inverts all the colour channels in the image and saves it as &#8216;inverted.jpg&#8217;.<\/p>\n<p><strong>Result:<\/strong><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1346\" src=\"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/invert.jpg\" alt=\"\" width=\"400\" height=\"300\" srcset=\"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/invert.jpg 400w, https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/invert-300x225.jpg 300w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/p>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">5<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Challenge 5 &#8211; RGB Split<\/h3>\n<p><span style=\"font-weight: 400;\">Create a program that splits the image into 3 different colour channels and saves a single colour copy of each image in &#8216;r.jpg&#8217;, &#8216;g.jpg&#8217; and &#8216;b.jpg&#8217;<\/span><\/p>\n<p><strong>Result:<\/strong><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1343\" src=\"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/b.jpg\" alt=\"\" width=\"400\" height=\"300\" srcset=\"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/b.jpg 400w, https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/b-300x225.jpg 300w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/> <img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1344\" src=\"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/g.jpg\" alt=\"\" width=\"400\" height=\"300\" srcset=\"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/g.jpg 400w, https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/g-300x225.jpg 300w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/> <img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1345\" src=\"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/r.jpg\" alt=\"\" width=\"400\" height=\"300\" srcset=\"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/r.jpg 400w, https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/r-300x225.jpg 300w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/p>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">6<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Challenge 6 &#8211; Increased Contrast<\/h3>\n<p><span style=\"font-weight: 400;\">Create a program that increases the contrast in the image and saves it as &#8216;contrast.jpg&#8217;.<\/span><\/p>\n<p><strong>Result:<\/strong><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1342\" src=\"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/contrast.jpg\" alt=\"\" width=\"400\" height=\"300\" srcset=\"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/contrast.jpg 400w, https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/contrast-300x225.jpg 300w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/p>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">7<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Challenge 7 &#8211; Rotated<\/h3>\n<p><span style=\"font-weight: 400;\">Create a program that rotates the image by 180 degrees and saves it as &#8216;rotated.jpg&#8217;. You should not use the in-built functions for this.<\/span><\/p>\n<p><strong>Result:<\/strong><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-1347\" src=\"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/resize-1.jpg\" alt=\"\" width=\"400\" height=\"300\" srcset=\"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/resize-1.jpg 400w, https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/resize-1-300x225.jpg 300w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/p>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">8<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Challenge 8 &#8211; Secret Message<\/h3>\n<p><span style=\"font-weight: 400;\">Create a program that stores a secret message that the user inputs in the image using <\/span><b>steganography<\/b><span style=\"font-weight: 400;\"> and saves the image as &#8216;secret.jpg&#8217;.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Write another program that decrypts the secret message.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<\/div><\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Example Code Here is some example code to help you get started! from PIL import Image im = Image.open(&#8216;cat.jpg&#8217;) im2 = im.resize((400,300),Image.LANCZOS) #create a smaller copy im2.save(&#8216;resize.jpg&#8217;) for x in range(im2.width): for y in range(im2.height): r,g,b = im2.getpixel((x,y)) r = r + 30 g = g + 30 b = b + 30 im2.putpixel((x, y),&hellip;&nbsp;<a href=\"https:\/\/learnlearn.uk\/python\/python-image-editing-challenges\/\" class=\"\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">Python Image Editing Challenges<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":70,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Python Image Editing Challenges - Python<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/learnlearn.uk\/python\/python-image-editing-challenges\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Image Editing Challenges - Python\" \/>\n<meta property=\"og:description\" content=\"Example Code Here is some example code to help you get started! from PIL import Image im = Image.open(&#039;cat.jpg&#039;) im2 = im.resize((400,300),Image.LANCZOS) #create a smaller copy im2.save(&#039;resize.jpg&#039;) for x in range(im2.width): for y in range(im2.height): r,g,b = im2.getpixel((x,y)) r = r + 30 g = g + 30 b = b + 30 im2.putpixel((x, y),&hellip;&nbsp;Read More &raquo;Python Image Editing Challenges\" \/>\n<meta property=\"og:url\" content=\"https:\/\/learnlearn.uk\/python\/python-image-editing-challenges\/\" \/>\n<meta property=\"og:site_name\" content=\"Python\" \/>\n<meta property=\"article:modified_time\" content=\"2022-10-14T11:31:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/cat.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/learnlearn.uk\/python\/python-image-editing-challenges\/\",\"url\":\"https:\/\/learnlearn.uk\/python\/python-image-editing-challenges\/\",\"name\":\"Python Image Editing Challenges - Python\",\"isPartOf\":{\"@id\":\"https:\/\/learnlearn.uk\/python\/#website\"},\"datePublished\":\"2022-10-14T11:12:24+00:00\",\"dateModified\":\"2022-10-14T11:31:59+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/learnlearn.uk\/python\/python-image-editing-challenges\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/learnlearn.uk\/python\/python-image-editing-challenges\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/learnlearn.uk\/python\/python-image-editing-challenges\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Python Unit Home\",\"item\":\"https:\/\/learnlearn.uk\/python\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python Image Editing Challenges\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/learnlearn.uk\/python\/#website\",\"url\":\"https:\/\/learnlearn.uk\/python\/\",\"name\":\"Python\",\"description\":\"Programming\",\"publisher\":{\"@id\":\"https:\/\/learnlearn.uk\/python\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/learnlearn.uk\/python\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/learnlearn.uk\/python\/#organization\",\"name\":\"Python\",\"url\":\"https:\/\/learnlearn.uk\/python\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/learnlearn.uk\/python\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2019\/03\/LearnLearnLogowhite.png\",\"contentUrl\":\"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2019\/03\/LearnLearnLogowhite.png\",\"width\":710,\"height\":98,\"caption\":\"Python\"},\"image\":{\"@id\":\"https:\/\/learnlearn.uk\/python\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python Image Editing Challenges - Python","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/learnlearn.uk\/python\/python-image-editing-challenges\/","og_locale":"en_GB","og_type":"article","og_title":"Python Image Editing Challenges - Python","og_description":"Example Code Here is some example code to help you get started! from PIL import Image im = Image.open('cat.jpg') im2 = im.resize((400,300),Image.LANCZOS) #create a smaller copy im2.save('resize.jpg') for x in range(im2.width): for y in range(im2.height): r,g,b = im2.getpixel((x,y)) r = r + 30 g = g + 30 b = b + 30 im2.putpixel((x, y),&hellip;&nbsp;Read More &raquo;Python Image Editing Challenges","og_url":"https:\/\/learnlearn.uk\/python\/python-image-editing-challenges\/","og_site_name":"Python","article_modified_time":"2022-10-14T11:31:59+00:00","og_image":[{"url":"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2022\/10\/cat.jpg"}],"twitter_card":"summary_large_image","twitter_misc":{"Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/learnlearn.uk\/python\/python-image-editing-challenges\/","url":"https:\/\/learnlearn.uk\/python\/python-image-editing-challenges\/","name":"Python Image Editing Challenges - Python","isPartOf":{"@id":"https:\/\/learnlearn.uk\/python\/#website"},"datePublished":"2022-10-14T11:12:24+00:00","dateModified":"2022-10-14T11:31:59+00:00","breadcrumb":{"@id":"https:\/\/learnlearn.uk\/python\/python-image-editing-challenges\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/learnlearn.uk\/python\/python-image-editing-challenges\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/learnlearn.uk\/python\/python-image-editing-challenges\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Python Unit Home","item":"https:\/\/learnlearn.uk\/python\/"},{"@type":"ListItem","position":2,"name":"Python Image Editing Challenges"}]},{"@type":"WebSite","@id":"https:\/\/learnlearn.uk\/python\/#website","url":"https:\/\/learnlearn.uk\/python\/","name":"Python","description":"Programming","publisher":{"@id":"https:\/\/learnlearn.uk\/python\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/learnlearn.uk\/python\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/learnlearn.uk\/python\/#organization","name":"Python","url":"https:\/\/learnlearn.uk\/python\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/learnlearn.uk\/python\/#\/schema\/logo\/image\/","url":"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2019\/03\/LearnLearnLogowhite.png","contentUrl":"https:\/\/learnlearn.uk\/python\/wp-content\/uploads\/sites\/4\/2019\/03\/LearnLearnLogowhite.png","width":710,"height":98,"caption":"Python"},"image":{"@id":"https:\/\/learnlearn.uk\/python\/#\/schema\/logo\/image\/"}}]}},"rttpg_featured_image_url":null,"rttpg_author":{"display_name":"learnlearnadmin","author_link":"https:\/\/learnlearn.uk\/python\/author\/learnlearnadmin\/"},"rttpg_comment":0,"rttpg_category":null,"rttpg_excerpt":"Example Code Here is some example code to help you get started! from PIL import Image im = Image.open('cat.jpg') im2 = im.resize((400,300),Image.LANCZOS) #create a smaller copy im2.save('resize.jpg') for x in range(im2.width): for y in range(im2.height): r,g,b = im2.getpixel((x,y)) r = r + 30 g = g + 30 b = b + 30 im2.putpixel((x, y),&hellip;&nbsp;Read&hellip;","_links":{"self":[{"href":"https:\/\/learnlearn.uk\/python\/wp-json\/wp\/v2\/pages\/1338"}],"collection":[{"href":"https:\/\/learnlearn.uk\/python\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/learnlearn.uk\/python\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/python\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/python\/wp-json\/wp\/v2\/comments?post=1338"}],"version-history":[{"count":7,"href":"https:\/\/learnlearn.uk\/python\/wp-json\/wp\/v2\/pages\/1338\/revisions"}],"predecessor-version":[{"id":1356,"href":"https:\/\/learnlearn.uk\/python\/wp-json\/wp\/v2\/pages\/1338\/revisions\/1356"}],"wp:attachment":[{"href":"https:\/\/learnlearn.uk\/python\/wp-json\/wp\/v2\/media?parent=1338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}