This repository was archived by the owner on Dec 23, 2025. It is now read-only.
Description Feature Addition: NumberMyImage
Description
Implement a utility to convert a black and white bitmap image into a numerical representation and then encode that number in base64 format.
Requirements
Input : Accept an image file as input.
If the input image is not in bitmap format, convert it to bitmap.
Pixel-to-Number Mapping :
Assign 0 to black pixels and 1 to white pixels in the bitmap.
Read the bitmap pixel by pixel and construct a binary string representing the image.
Conversion to Base64 :
Convert the binary string obtained from the image into its decimal equivalent.
Encode the decimal number to base64 format.
Output :
Print or save the base64 string representing the image.
Error Handling :
Handle invalid inputs gracefully (e.g., non-image files or unsupported formats).
Provide informative error messages to users.
Additional Notes
Ensure the implementation is efficient for large images.
Use appropriate Python libraries for image processing (e.g., Pillow) and base64 encoding.
Include detailed comments and logs for clarity and debugging purposes.
Acceptance Criteria
The utility correctly converts any valid black and white image to its corresponding base64 representation.
Handles edge cases such as completely black/white images or non-bitmap inputs.
Outputs a clear and concise result.
Submission
Deadline : 29/12/24
Languages Allowed : Python or Rust
Refer to submission.txt in the submission folder for submission guidelines.
Reactions are currently unavailable
Feature Addition: NumberMyImage
Description
Implement a utility to convert a black and white bitmap image into a numerical representation and then encode that number in base64 format.
Requirements
Input: Accept an image file as input.
Pixel-to-Number Mapping:
0to black pixels and1to white pixels in the bitmap.Conversion to Base64:
Output:
Error Handling:
Additional Notes
Pillow) and base64 encoding.Acceptance Criteria
Submission
submission.txtin the submission folder for submission guidelines.