{"id":16237548,"url":"https://github.com/lmarzen/dice-mosaic","last_synced_at":"2026-03-02T18:02:21.649Z","repository":{"id":38366023,"uuid":"453206122","full_name":"lmarzen/dice-mosaic","owner":"lmarzen","description":"Generate dice mosaics from jpeg/png images.","archived":false,"fork":false,"pushed_at":"2025-05-06T03:16:46.000Z","size":5705,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-11T20:03:02.582Z","etag":null,"topics":["converter","dice","die","generator","image-processing","mosaic","mural"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lmarzen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-01-28T20:22:09.000Z","updated_at":"2025-05-06T03:16:49.000Z","dependencies_parsed_at":"2025-07-11T20:03:04.312Z","dependency_job_id":"744db905-d86b-4d53-b650-8e1effb117b8","html_url":"https://github.com/lmarzen/dice-mosaic","commit_stats":{"total_commits":67,"total_committers":2,"mean_commits":33.5,"dds":0.08955223880597019,"last_synced_commit":"25d0199876911d7554728fd8c9d0caf318ab4a1c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lmarzen/dice-mosaic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmarzen%2Fdice-mosaic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmarzen%2Fdice-mosaic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmarzen%2Fdice-mosaic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmarzen%2Fdice-mosaic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lmarzen","download_url":"https://codeload.github.com/lmarzen/dice-mosaic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmarzen%2Fdice-mosaic/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266563915,"owners_count":23948689,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["converter","dice","die","generator","image-processing","mosaic","mural"],"created_at":"2024-10-10T13:36:05.570Z","updated_at":"2026-03-02T18:02:16.607Z","avatar_url":"https://github.com/lmarzen.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dice-mosaic\nGenerate dice mosaics from jpeg/png images.\n\nDefault options will attempt to read from 'input.jpg' in the current directory, scale the image by 0.05, then convert each pixel to grayscale before generating a dice mosaic using  black die(w/ white dots) and saving the dice mosaic to 'output.png'.\n\nUsage\n---\nExample: `./dice-mosaic -i examples/moon.jpg -o examples/moon_black_dice.png`\n\n![moon black dice](examples/moon_black_dice.png)\n\nFor all white die(w/ black dots) use the '-g w' flag.\n\nExample: `./dice-mosaic -i examples/moon.jpg -o examples/moon_white_dice.png -g w`\n\n![moon white dice](examples/moon_white_dice.png)\n\nHere is an example of a mixed(white and black) die mosaic that was processed with increased contrast and brightness, and scaled to the largest resolution possible while not exceeding 48,000 die. Additionally the option -l [filename], indicates that the program should output a text file containing a map of dice values.\n\nExample: `./dice-mosaic -i examples/sg.jpg -o examples/sg_dice.png -b 8 -c 1.17 -g m -m 48000 -l examples/sg.txt`\n\n![sg dice](examples/sg_dice.png)\n\nOptions\n---\n-i [filename]\n\u003cul\u003e\nInput image(jpeg/png) filename or path.\n\u003c/ul\u003e\u003cul\u003e\nDefault is 'input.jpg'\n\u003c/ul\u003e\n-o [filename]\n\u003cul\u003e\nOutput image filename or path. Default output format is .png.\n\u003c/ul\u003e\u003cul\u003e\nDefault  is 'output.png`\n\u003c/ul\u003e\n-x [scale_factor]\n\u003cul\u003e\nFactor to scale input image by. Aspect ratio is preserved. Must be greater than 0. After scaling, each pixel cooresponds to a single dice. (this is the default scaling behavior if -x, -w, -h or -m, are not specified) \n\u003c/ul\u003e\u003cul\u003e\nDefault is 0.05\n\u003c/ul\u003e\u003cul\u003e              \nCannot be used in conjunction with -w, -h, or -m.\n\u003c/ul\u003e\n-w [width]\n\u003cul\u003e\nAlternative scaling option, will scale an image to a specified number of die in width while preserving aspect ratio. Must be an integer greater than 0.\n\u003c/ul\u003e\u003cul\u003e\nCannot be used in conjunction with -x, -h, or -m.\n\u003c/ul\u003e\n-h [height]\n\u003cul\u003e\nAlternative scaling option, will scale an image to a specified number of die in height while preserving aspect ratio. Must be an integer greater than 0.\n\u003c/ul\u003e\u003cul\u003e\nCannot be used in conjunction with -x, -w, or -m.\n\u003c/ul\u003e\n-m [max_allowable_die]\n\u003cul\u003e\nAlternative scaling option, will scale the input image as large as possible while not exceed the specified number of die. Aspect ratio is preserved. Must be an integer greater than 0.\n\u003c/ul\u003e\u003cul\u003e\nCannot be used in conjunction with -x, -w, or -h.\n\u003c/ul\u003e\n-l [filename]\n\u003cul\u003e\nWill output a text file containing a list of dice values, at the specified path.\n\u003c/ul\u003e\n-g [m,b,w]\n\u003cul\u003e\nFor all black die(w/ white dots) use './dice-mosaic -g b'. (this is the default if -g is not specified)\n\u003c/ul\u003e\u003cul\u003e\nFor all white die(w/ black dots) use './dice-mosaic -g w'.\n\u003c/ul\u003e\u003cul\u003e\nFor a mix of black and white die use './dice-mosaic -g m'.\n\u003c/ul\u003e\n-j [jpg_quality]\n\u003cul\u003e\nSet the output image format to JPEG and set JPEG quality setting. Integer from 0-100. High quality is 80-90.\n\u003c/ul\u003e\u003cul\u003e\nCannot be used in conjunction with -p.\n\u003c/ul\u003e\n-p\n\u003cul\u003e\nSet the output image format to png. (this is the default if -j or -p is not specified)\n\u003c/ul\u003e\u003cul\u003e\nCannot be used in conjunction with -j.\n\u003c/ul\u003e\n-c [contrast_modifier]\n\u003cul\u003e\nChange the contrast. a \u003e 1 means more contrast, 0 \u003c a \u003c 1 means less contrast.\n\u003c/ul\u003e\u003cul\u003e\nThe value of a pixel is determined by the following function: f(x) = a(x) + b\n\u003c/ul\u003e\u003cul\u003e\nDefault is a=1.0\n\u003c/ul\u003e\n-b [brightness_modifier]\n\u003cul\u003e\nChange the brightness.\n\u003c/ul\u003e\u003cul\u003e\nThe value of a pixel is determined by the following function: f(x) = a(x) + b\n\u003c/ul\u003e\u003cul\u003e\nDefault is b=0.0\n\u003c/ul\u003e\n-r [dice_resolution]\n\u003cul\u003e\nSet the resolution of the dice that make up the mosaic. [dice_resolution] is the length of the sides of each dice. Must be an integer that is at least 12.\n\u003c/ul\u003e\u003cul\u003e\nDefault is 40\n\u003c/ul\u003e\n-d [cost_per_dice]\n\u003cul\u003e\nWhen this input is given the program will calculate the total cost of the mosaic. (Assumes USD)\n\u003c/ul\u003e\n-s [dice_size]\n\u003cul\u003e\nWhen this input is given the program will calculate the total size of the mural. (Assumes inches) (0.63in (16mm) is most common)\n\u003c/ul\u003e\n\nGetting Started\n---\n\n* Clone repository `git clone https://github.com/lmarzen/dice-mosaic.git` or download and extract ZIP.\n\n* To build on linux run `make linux`.\n\n* Run the program by typing `./dice-mosaic` if on linux or `dice-mosaic_x86.exe` if on windows 32-bit or `dice-mosaic_x64.exe` if on windows 64-bit, followed by any valid arguments.\n\n* Done.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flmarzen%2Fdice-mosaic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flmarzen%2Fdice-mosaic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flmarzen%2Fdice-mosaic/lists"}