Ground Rules
- Must push your work to a repository to be considered (timestamp of commit will be used in “tie” situations)
- You can use any language that you see fit.
- The implementation must be able to run with provided input. (run locally or deployed somewhere).
- Postman will be used to validate so you must have this on your machine.
- Code as you normally do, use Google
Problem to Solve In today’s challenge, we will be doing some image processing. Create a service that takes in a Base64 Encoded String and outputs a processed Base64 Encoded string. POST with body: { "encoded" : "${BASE64EncodedString}" }
Challenge #1: Given an image input, change the Primary Text Color to any color than the original. Leave the background as-is. http://localhost:8080/fontChange
Challenge #2: Given an image input, inverse the colors of the image. The text will be "mostly black" and the background white. http://localhost:8080/inverse
Extra Credit Challenge #3: Given an image input, rotate the image 90 degrees(either direction) via low level operations. Packages that rotate the “file” as whole are not qualified solutions. http://localhost:8080/rotate
Assumptions:
- Only happy scenarios will be involved. a. Don’t worry about error handling.
- Only PNG will be used for testing.
- Roughly only “black and white” images will be used.
Hints:
RGB(255, 255, 255) is White
RGB(0,0,0) is Black
Helpful links: Base64 file encoder: https://varvy.com/tools/base64/
RGB Color Chart: https://www.rapidtables.com/web/color/RGB_Color.html
Base64 to Image decoder: https://codebeautify.org/base64-to-image-converter
iVBORw0KGgoAAAANSUhEUgAAAUAAAAAsCAYAAAAU0WE/AAAMGGlDQ1BJQ0MgUHJvZmlsZQAASImVVwdUU0kXnldSCAktEAEpoTdBOgGk9yIgHWyEJEAoIQSCir0sKrgWVESwoisgCq4FkEVF7Moi2PuCioqyLhZsqPyTBNB1/3L+e868970799757p2Zd2YAULRnC4WZqBIAWYI8UWSANzM+IZFJeggQgAIyYAEGm5Mr9IqICAVQRt9/l3c3oDWUq5aSWP/s/6+izOXlcgBAIiBO5uZysiA+DACuyRGK8gAgdEK9waw8oQS/hVhVBAkCQCRLcKoMa0lwsgxbS22iI30g9gWATGWzRakAKEjiM/M5qTCOghBiawGXL4B4B8TunDQ2F+JuiCdkZWVDrEiF2DT5uzipf4uZPBaTzU4dw7JcpEL25ecKM9lz/s9y/G/JyhSPjqEPGzVNFBgpyRnWrTojO0SC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xUFZqRRIH8DGbpCM9c49fkTzLncA6KNCJh8Z9td7E3u0UfQrnzIA1hU6wKfMxBT7Zm9uZ2PFMBT3qPCUE/OlpLf1STHDbojguu4b7yaaGzvk7gNmO5ZEUkQBGxuekt1+bzxA2sZfpg+9O9VLD5XcDgf/+/Vt9Dv9UUfyX+uf4SX364av68lWpn379Rf3+2x/q5x+/v9G6f7fezd7+eUg0bgsBIcC2kBQ5goAg0DsEhAB75zJRWBAQBNpCQAiwLSRFjiAgCPQOASHA3rlMFBYEBIG2EBACbAtJkSMICAK9Q0AIsHcuE4UFAUGgLQSEANtCUuQIAoJA7xAQAuydy0RhQUAQaAsBIcC2kBQ5goAg0DsE/gcfBliT2xSRDwAAAABJRU5ErkJggg==
==================================================