{"id":214,"date":"2026-02-09T00:17:54","date_gmt":"2026-02-09T00:17:54","guid":{"rendered":"https:\/\/madelinekrajewski.knight.domains\/capstone\/?page_id=214"},"modified":"2026-04-21T02:09:50","modified_gmt":"2026-04-21T02:09:50","slug":"week-11-post","status":"publish","type":"page","link":"https:\/\/madelinekrajewski.knight.domains\/capstone\/blog\/week-11-post\/","title":{"rendered":"Week 11: Testing, Testing!"},"content":{"rendered":"<h5 class=\"wp-block-heading has-text-align-center\" id=\"madeline-krajewski\">Madeline Krajewski<\/h5>\n\n\n<div class=\"has-text-align-center wp-block-post-date\"><time datetime=\"2026-04-13T03:39:41.797Z\">April 13, 2026<\/time><\/div>\n\n\n<p>This week, I thoroughly decoded my encoder and decoder. I tested for every bug I could conceive of, and fixed almost all of the ones I encountered. There is one bug left, as far as I can tell, and it&#8217;s in some ways only half of a bug. I&#8217;ll explain more later, but for now, the successes!<\/p>\n\n\n\n<p>First, here is a table showing what each test is, and what images were used. I&#8217;ll restate it throughout my post, but I figured it might be handy to gather all the information in one location.<\/p>\n\n\n\n<p>The &#8220;Normal&#8221; Tests:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>Test:<\/td><td>Host Image (bird):<\/td><td>Secret Image (bird):<\/td><\/tr><tr><td>Host &amp; Secret have the same width and height<\/td><td>European Robin (HostBird  in past blog posts)<\/td><td>Common Kingfisher (SecretBird in past blog posts)<\/td><\/tr><tr><td>Secret is wider than the Host but has a smaller total pixel count<\/td><td>California Quail<\/td><td>Ruby Red Hummingbird<\/td><\/tr><tr><td>Secret is taller than the Host but has a smaller total pixel count<\/td><td>Ruby Red Hummingbird<\/td><td>Kookaburra<\/td><\/tr><tr><td>Secret is wider than the Host but has an identical total pixel count<\/td><td>Puffin<\/td><td>Peacock<\/td><\/tr><tr><td>Secret is taller than the Host but has an identical total pixel count<\/td><td>Peacock<\/td><td>Puffin<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Secret is 1\/2 the size of or smaller than the Host:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>Test:<\/td><td>Host Image:<\/td><td>Secret Image:<\/td><\/tr><tr><td>Secret has a longer width than the Host*<\/td><td>California Quail<\/td><td>Puffin<\/td><\/tr><tr><td>Secret has a taller height than the Host<\/td><td>Puffin<\/td><td>Stork Billed Kingfisher<\/td><\/tr><tr><td>Secret is exactly half the size of the Host**<\/td><td>Peacock<\/td><td>Short-Eared Owl<\/td><\/tr><tr><td>The Host has an odd number of pixels<\/td><td>Puffin (odd)<\/td><td>Stork Billed Kingfisher<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">* The image is encoded with an odd number of bits<br>** the image is encoded with an even number of bits<\/figcaption><\/figure>\n\n\n\n<p>Additionally, here are each image&#8217;s dimensions and total pixel counts:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>Image:<\/td><td>Width:<\/td><td>Height:<\/td><td>Total # of Pixels:<\/td><\/tr><tr><td>European Robin<\/td><td>2000<\/td><td>2000<\/td><td>4,000,000<\/td><\/tr><tr><td>Common Kingfisher (blue)<\/td><td>2000<\/td><td>2000<\/td><td>4,000,000<\/td><\/tr><tr><td>Ruby Red Hummingbird<\/td><td>3920<\/td><td>2800<\/td><td>10,976,000<\/td><\/tr><tr><td>Kookaburra<\/td><td>2500<\/td><td>3500<\/td><td>8,750,000<\/td><\/tr><tr><td>California Quail<\/td><td>2900<\/td><td>4200<\/td><td>12,180,000<\/td><\/tr><tr><td>Puffin<\/td><td>3000<\/td><td>2000<\/td><td>6,000,000<\/td><\/tr><tr><td>Puffin (odd)<\/td><td>2999<\/td><td>1999<\/td><td>5,995,001<\/td><\/tr><tr><td>Peacock<\/td><td>2000<\/td><td>3000<\/td><td>6,000,000<\/td><\/tr><tr><td>Stork Billed Kingfisher (brown)<\/td><td>1200<\/td><td>2400<\/td><td>2,880,000<\/td><\/tr><tr><td>Short-Eared Owl<\/td><td>1500<\/td><td>2000<\/td><td>3,000,000<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>And lastly, a dropdown box with each image for those who are less familiar with different bird species:<\/p>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>Bird Images<\/summary>\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>European Robin<\/summary>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/host-bird-1024x1024.jpg\" alt=\"\" class=\"wp-image-657\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/host-bird-1024x1024.jpg 1024w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/host-bird-300x300.jpg 300w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/host-bird-150x150.jpg 150w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/host-bird-768x768.jpg 768w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/host-bird-1536x1536.jpg 1536w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/host-bird.jpg 2000w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/details>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>Common Kingfisher<\/summary>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/secret-bird-1024x1024.jpg\" alt=\"\" class=\"wp-image-658\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/secret-bird-1024x1024.jpg 1024w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/secret-bird-300x300.jpg 300w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/secret-bird-150x150.jpg 150w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/secret-bird-768x768.jpg 768w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/secret-bird-1536x1536.jpg 1536w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/secret-bird.jpg 2000w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/details>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>Ruby Red Hummingbird<\/summary>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"731\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/hummingbird-1024x731.jpg\" alt=\"\" class=\"wp-image-692\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/hummingbird-1024x731.jpg 1024w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/hummingbird-300x214.jpg 300w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/hummingbird-768x549.jpg 768w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/hummingbird-1536x1097.jpg 1536w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/hummingbird-2048x1463.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/details>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>Kookaburra<\/summary>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"731\" height=\"1024\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/kookaburra-731x1024.jpg\" alt=\"\" class=\"wp-image-659\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/kookaburra-731x1024.jpg 731w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/kookaburra-214x300.jpg 214w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/kookaburra-768x1075.jpg 768w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/kookaburra-1097x1536.jpg 1097w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/kookaburra-1463x2048.jpg 1463w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/kookaburra-scaled.jpg 1829w\" sizes=\"auto, (max-width: 731px) 100vw, 731px\" \/><\/figure>\n<\/details>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>California Quail<\/summary>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"707\" height=\"1024\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/cali-quail-707x1024.jpg\" alt=\"\" class=\"wp-image-662\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/cali-quail-707x1024.jpg 707w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/cali-quail-207x300.jpg 207w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/cali-quail-768x1112.jpg 768w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/cali-quail-1061x1536.jpg 1061w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/cali-quail-1414x2048.jpg 1414w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/cali-quail-scaled.jpg 1768w\" sizes=\"auto, (max-width: 707px) 100vw, 707px\" \/><\/figure>\n<\/details>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>Puffin<\/summary>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/puffin-1024x683.jpg\" alt=\"\" class=\"wp-image-660\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/puffin-1024x683.jpg 1024w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/puffin-300x200.jpg 300w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/puffin-768x512.jpg 768w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/puffin-1536x1024.jpg 1536w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/puffin-2048x1365.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/details>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>Peacock<\/summary>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"683\" height=\"1024\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/peacock-683x1024.jpg\" alt=\"\" class=\"wp-image-661\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/peacock-683x1024.jpg 683w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/peacock-200x300.jpg 200w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/peacock-768x1152.jpg 768w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/peacock-1024x1536.jpg 1024w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/peacock-1365x2048.jpg 1365w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/peacock-scaled.jpg 1707w\" sizes=\"auto, (max-width: 683px) 100vw, 683px\" \/><\/figure>\n<\/details>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>Stork Billed Kingfisher<\/summary>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"512\" height=\"1024\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/stork-billed-kingfisher-512x1024.jpg\" alt=\"\" class=\"wp-image-663\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/stork-billed-kingfisher-512x1024.jpg 512w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/stork-billed-kingfisher-150x300.jpg 150w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/stork-billed-kingfisher-768x1536.jpg 768w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/stork-billed-kingfisher-1024x2048.jpg 1024w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/stork-billed-kingfisher.jpg 1200w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/figure>\n<\/details>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>Short-Eared Owl<\/summary>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"1024\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/owl-768x1024.jpg\" alt=\"\" class=\"wp-image-664\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/owl-768x1024.jpg 768w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/owl-225x300.jpg 225w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/owl-1152x1536.jpg 1152w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/owl.jpg 1500w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/figure>\n<\/details>\n<\/details>\n\n\n\n<p>Now, for the test results!<\/p>\n\n\n\n<p>Here are the &#8220;Normal&#8221; tests. All of them worked, thankfully!<\/p>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>Host &amp; Secret have the same width and height<\/summary>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"314\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/ssize-results-1024x314.png\" alt=\"\" class=\"wp-image-665\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/ssize-results-1024x314.png 1024w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/ssize-results-300x92.png 300w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/ssize-results-768x236.png 768w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/ssize-results.png 1262w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Why test it?<\/p>\n\n\n\n<p>This test is to make sure that, with all my programming changes, this test still works. It does, hooray! It did not, however, work earlier this week. Thankfully, with the assistance of Dr. Meyer &amp; Dr. McVey, we found the error! I had placed the image display condition inside a condition which only triggered when the secret image&#8217;s total pixel count was less than the total pixel count of the host image.<\/p>\n<\/details>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>Secret is wider than the Host but has a smaller total pixel count<\/summary>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"296\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/result3-1024x296.png\" alt=\"\" class=\"wp-image-667\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/result3-1024x296.png 1024w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/result3-300x87.png 300w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/result3-768x222.png 768w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/result3.png 1285w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Why test it? <\/p>\n\n\n\n<p>This is to verify that the decoder can properly determine what to do when the secret image&#8217;s pixels carry over to the next column of the host image when the secret image&#8217;s row has not completed. That is, one row of the secret image&#8217;s pixels get split across multiple rows of the host image. Additionally, this makes sure that this condition works when an image has an offset.<\/p>\n<\/details>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>Secret is taller than the Host but has a smaller total pixel count<\/summary>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"341\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/result2-1024x341.png\" alt=\"\" class=\"wp-image-669\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/result2-1024x341.png 1024w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/result2-300x100.png 300w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/result2-768x256.png 768w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/result2.png 1301w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Why test it?<\/p>\n\n\n\n<p>For similar reasons as above, I wanted to make sure that the decoder knew what to do when a secret image might have many small rows which may get encoded in the same rows. The secret image has a different counter than the host image in the decoder, and I want to verify it works correctly for the two failure points: width, and height. I encode and decode each image in a nested for loop (I promise, that&#8217;s the proper term and not simply a bird pun!). However, I need to keep track of four variables instead of 2: the width of the host, the width of the secret, the height of the host, and the height of the secret. That&#8217;s a lot of room for errors, and it&#8217;s quite a relief that I&#8217;ve passed this test!<\/p>\n<\/details>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>Secret is wider than the Host but has an identical total pixel count<\/summary>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"290\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/result1-1024x290.png\" alt=\"\" class=\"wp-image-672\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/result1-1024x290.png 1024w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/result1-300x85.png 300w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/result1-768x218.png 768w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/result1.png 1323w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Why test it?<\/p>\n\n\n\n<p>I wanted to verify it worked. Neither of these tests have an offset, so in a sense, I&#8217;ve already done the more difficult test above. However, it&#8217;s important to test every case, and this is one.<\/p>\n<\/details>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>Secret is taller than the Host but has an identical total pixel count<\/summary>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"319\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/result-1024x319.png\" alt=\"\" class=\"wp-image-671\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/result-1024x319.png 1024w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/result-300x93.png 300w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/result-768x239.png 768w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/result.png 1302w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Why test it?<\/p>\n\n\n\n<p>Simply put, to make sure it didn&#8217;t <em>not <\/em>work.<\/p>\n<\/details>\n\n\n\n<p>Now, for the disappointing results. Alas, something has gone wrong either in my encoder or decoder, and I&#8217;m unsure which. Notice how the secret image is strangely desaturated and has some off colors in places? That&#8217;s the issue.<\/p>\n\n\n\n<p>Secret is 1\/2 the size of or smaller than the Host:<\/p>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>Secret has a longer width than the Host<\/summary>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"359\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/error-1024x359.png\" alt=\"\" class=\"wp-image-675\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/error-1024x359.png 1024w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/error-300x105.png 300w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/error-768x269.png 768w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/error.png 1312w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Why test it?<\/p>\n\n\n\n<p>This group of tests is a completely separate process for decoding. This is because the encoding works completely differently: since the secret image is so drastically smaller than the host image, we can encode one pixel of the secret image in two pixels of the host. This allows for more information to be preserved, as well as more subtle encoding, depending on what the user chooses. Therefore, we need to test similar cases here as we did for the &#8220;Normal&#8221; encoding process.<\/p>\n<\/details>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>Secret has a taller height than the Host<\/summary>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"311\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/puffinres-1024x311.png\" alt=\"\" class=\"wp-image-682\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/puffinres-1024x311.png 1024w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/puffinres-300x91.png 300w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/puffinres-768x234.png 768w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/puffinres.png 1256w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Why test it?<\/p>\n\n\n\n<p>Because it&#8217;s important to see what might happen before a user does.<\/p>\n<\/details>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>Secret is exactly half the size of the Host<\/summary>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"304\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/exactly-half-size-1024x304.png\" alt=\"\" class=\"wp-image-679\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/exactly-half-size-1024x304.png 1024w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/exactly-half-size-300x89.png 300w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/exactly-half-size-768x228.png 768w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/exactly-half-size.png 1252w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Why test it?<\/p>\n\n\n\n<p>Well, I&#8217;ve so far presumed the image will have an offset and as such, will not use <em>every single pixel<\/em> for encoding in the host image. It appears this is an incredibly important test, as the owl seems to have gotten shifted pretty off center. For reference, this is what our owl should look like:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"1024\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/owl-1-768x1024.jpg\" alt=\"\" class=\"wp-image-680\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/owl-1-768x1024.jpg 768w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/owl-1-225x300.jpg 225w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/owl-1-1152x1536.jpg 1152w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/owl-1.jpg 1500w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/figure>\n<\/details>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>The Host has an odd number of pixels<\/summary>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"326\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/puffin-odd-test-1024x326.png\" alt=\"\" class=\"wp-image-678\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/puffin-odd-test-1024x326.png 1024w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/puffin-odd-test-300x95.png 300w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/puffin-odd-test-768x244.png 768w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/puffin-odd-test.png 1241w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Why test it?<\/p>\n\n\n\n<p>I&#8217;ve done a sneaky thing where I throw away the odd-numbered column in order to make the encoder work properly. Since I need to encode two pixels at once in order to split the secret image&#8217;s pixel information, I need to do each encoding in groups of two. Otherwise, I (and therefore, my program) would struggle to know whether we encoded the first half or second half of the pixel data. I tackled this by making my inner, traverse-through-the-row for loop increment by two each time. It needs to stop when it is still less than the check, but this could go haywire when the width is odd. (If our int i is currently 12, and the loop ends at 13, it could cause the program to try to encode on a pixel which doesn&#8217;t exist).<\/p>\n\n\n\n<p>I chose to resolve this issue by having the encoder pretend the final column does not exist. As a result, I need the decoder to do the same thing.<\/p>\n<\/details>\n\n\n\n<p>Well, it appears I have one final thing to tackle for Algorithm 1, but I will say, I am quite chuffed with the results of this week! I have tested as I&#8217;ve gone, but sitting down and testing everything at once was quite the ordeal. For one, I had to go through and determine every test which needed to occur, and also debug until I got the correct results.<\/p>\n\n\n\n<p>This week, I&#8217;ve also begun the process of going through and adding proper documentation to my code. Here&#8217;s an example of what that looks like:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"679\" src=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/image-2-1024x679.png\" alt=\"\" class=\"wp-image-683\" srcset=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/image-2-1024x679.png 1024w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/image-2-300x199.png 300w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/image-2-768x510.png 768w, https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-content\/uploads\/2026\/04\/image-2.png 1132w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>This was one of the easier ones to accomplish. Current count is 5\/6 of the encoder, and 0\/4 of the decoder. The last one of the encoder is the one in which I actually do the bulk of the work, and as such, it&#8217;s quite a daunting one to tackle. I plan to print off that function&#8217;s code and go through with a highlighter to make it easier to do.<\/p>\n\n\n\n<p>Thankfully, the decoder is in a much nicer state. There&#8217;s only one big function to do there, and it is not half as complicated as the encoder&#8217;s counterpart! I&#8217;m hoping to have all of this documentation done by the end of next week.<\/p>\n\n\n\n<p>Lastly, I&#8217;ve copied the Sources from last week here, since this is the week in which the images got used:<\/p>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>Sources<\/summary>\n<p>&#8220;Puffin Talk on Saltee Island Great&#8221; by <a href=\"https:\/\/unsplash.com\/@wwwynand?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\" target=\"_blank\" rel=\"noreferrer noopener\">Wynand van Poortvliet<\/a> on <a href=\"https:\/\/unsplash.com\/photos\/two-black-and-white-birds-4AmyOdXZAQc?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\" target=\"_blank\" rel=\"noreferrer noopener\">Unsplash<\/a><\/p>\n\n\n\n<p>&#8220;California Quail&#8221; by <a href=\"https:\/\/unsplash.com\/@brock222?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\" target=\"_blank\" rel=\"noreferrer noopener\">Richard Lee<\/a> on <a href=\"https:\/\/unsplash.com\/photos\/black-and-white-bird-on-brown-wooden-stick-WOY8h-olonY?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\" target=\"_blank\" rel=\"noreferrer noopener\">Unsplash<\/a><\/p>\n\n\n\n<p>&#8220;Black-Capped Chickadee&#8221; by <a href=\"https:\/\/unsplash.com\/@patriceb?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\" target=\"_blank\" rel=\"noreferrer noopener\">Patrice Bouchard<\/a> on <a href=\"https:\/\/unsplash.com\/photos\/white-and-black-bird-on-brown-tree-branch-OiqxjiIv6XU?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\" target=\"_blank\" rel=\"noreferrer noopener\">Unsplash<\/a><\/p>\n\n\n\n<p>&#8220;Blue-Winged Kookaburra&#8221; by <a href=\"https:\/\/unsplash.com\/@heracles1903?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\" target=\"_blank\" rel=\"noreferrer noopener\">Peter Scholten<\/a> on <a href=\"https:\/\/unsplash.com\/photos\/closeup-photography-of-blue-gray-brown-and-white-bird-on-tree-branch-Pw779GyBLqI?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\" target=\"_blank\" rel=\"noreferrer noopener\">Unsplash<\/a><\/p>\n\n\n\n<p>&#8220;A Peacock in the Helsinki Zoo&#8221; by <a href=\"https:\/\/unsplash.com\/@juliusjansson?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\" target=\"_blank\" rel=\"noreferrer noopener\">Julius Jansson<\/a> on <a href=\"https:\/\/unsplash.com\/photos\/blue-peacock-in-close-up-photography-VErERoedYrE?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\" target=\"_blank\" rel=\"noreferrer noopener\">Unsplash<\/a><\/p>\n\n\n\n<p>&#8220;Stork-Billed Kingfisher Perching on Brown Wooden Stand&#8221; by <a href=\"https:\/\/unsplash.com\/@tomlener?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\" target=\"_blank\" rel=\"noreferrer noopener\">Thomas Maximilian Lener<\/a> on <a href=\"https:\/\/unsplash.com\/photos\/selective-focus-photo-of-stork-billed-kingfisher-perching-on-brown-wooden-stand-ie9zNgph23Y?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\" target=\"_blank\" rel=\"noreferrer noopener\">Unsplash<\/a><\/p>\n\n\n\n<p>&#8220;Pink Pelican&#8221; by <a href=\"https:\/\/unsplash.com\/@maksimsamsonov?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\" target=\"_blank\" rel=\"noreferrer noopener\">Maksim Samsonov<\/a> on <a href=\"https:\/\/unsplash.com\/photos\/white-long-beaked-bird-BsgEjTQqkPw?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\" target=\"_blank\" rel=\"noreferrer noopener\">Unsplash<\/a><\/p>\n\n\n\n<p>&#8220;Ruby Throated Hummingbird&#8221; Photo by <a href=\"https:\/\/unsplash.com\/@candiscamera2019?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\" target=\"_blank\" rel=\"noreferrer noopener\">Candi Foltz<\/a> on <a href=\"https:\/\/unsplash.com\/photos\/green-and-brown-humming-bird-flying-l23EsqKgDts?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\" target=\"_blank\" rel=\"noreferrer noopener\">Unsplash<\/a><\/p>\n\n\n\n<p>&#8220;The Raven&#8221; by <a href=\"https:\/\/unsplash.com\/@dshap?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\" target=\"_blank\" rel=\"noreferrer noopener\">Daniel Shapiro<\/a> on <a href=\"https:\/\/unsplash.com\/photos\/a-black-bird-sitting-on-top-of-a-roof-d-vBDK5rqR0?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\" target=\"_blank\" rel=\"noreferrer noopener\">Unsplash<\/a><\/p>\n\n\n\n<p>&#8220;UK Seagull Portrait&#8221; Photo by <a href=\"https:\/\/unsplash.com\/@peterfwolf?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\" target=\"_blank\" rel=\"noreferrer noopener\">Peter F. Wolf<\/a> on <a href=\"https:\/\/unsplash.com\/photos\/european-herring-gull-Xfkp_sIEs7w?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\" target=\"_blank\" rel=\"noreferrer noopener\">Unsplash<\/a><\/p>\n\n\n\n<p>&#8220;Bee Hummingbird, Cuba&#8221; by <a href=\"https:\/\/pixabay.com\/users\/barbeeanne-516629\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=3697689\" target=\"_blank\" rel=\"noreferrer noopener\">Anne and Saturnino Miranda<\/a> from <a href=\"https:\/\/pixabay.com\/\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=3697689\" target=\"_blank\" rel=\"noreferrer noopener\">Pixabay<\/a><\/p>\n\n\n\n<p>&#8220;Short-Eared Owl&#8221; by <a href=\"https:\/\/unsplash.com\/@brock222?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\">Richard Lee<\/a> on <a href=\"https:\/\/unsplash.com\/photos\/time-lapse-photography-of-owl-flying-xWQcud4Xtr4?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\">Unsplash<\/a><\/p>\n\n\n\n<p>&#8220;Tufted Titmouse&#8221; by <a href=\"https:\/\/unsplash.com\/@markolsen?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\">Mark Olsen<\/a> on <a href=\"https:\/\/unsplash.com\/photos\/white-and-gray-bird-on-brown-tree-branch-kbroHYIvRr0?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\">Unsplash<\/a><\/p>\n<\/details>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/blog\/week-10-post\/\">Previous: Week 10<\/a><\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-buttons is-content-justification-right is-layout-flex wp-container-core-buttons-is-layout-d445cf74 wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/madelinekrajewski.knight.domains\/capstone\/blog\/week-11-post\/\">Next: Week 11<\/a><\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Madeline Krajewski This week, I thoroughly decoded my encoder and decoder. I tested for every bug I could conceive of, and fixed almost all of the ones I encountered. There is one bug left, as far as I can tell, and it&#8217;s in some ways only half of a bug. I&#8217;ll explain more later, but [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":88,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":"[]"},"class_list":["post-214","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-json\/wp\/v2\/pages\/214","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-json\/wp\/v2\/comments?post=214"}],"version-history":[{"count":24,"href":"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-json\/wp\/v2\/pages\/214\/revisions"}],"predecessor-version":[{"id":696,"href":"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-json\/wp\/v2\/pages\/214\/revisions\/696"}],"up":[{"embeddable":true,"href":"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-json\/wp\/v2\/pages\/88"}],"wp:attachment":[{"href":"https:\/\/madelinekrajewski.knight.domains\/capstone\/wp-json\/wp\/v2\/media?parent=214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}