{"id":18370308,"url":"https://github.com/travispaul/wmf2png","last_synced_at":"2025-04-06T19:31:43.878Z","repository":{"id":57398697,"uuid":"118576193","full_name":"travispaul/wmf2png","owner":"travispaul","description":"Convert a Windows Metafile (WMF) to a PNG.","archived":false,"fork":false,"pushed_at":"2018-02-06T09:25:51.000Z","size":18,"stargazers_count":5,"open_issues_count":0,"forks_count":4,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-06T12:04:09.116Z","etag":null,"topics":["converter","windows","wmf"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/travispaul.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}},"created_at":"2018-01-23T07:46:54.000Z","updated_at":"2025-03-13T03:48:13.000Z","dependencies_parsed_at":"2022-09-01T18:10:22.588Z","dependency_job_id":null,"html_url":"https://github.com/travispaul/wmf2png","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travispaul%2Fwmf2png","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travispaul%2Fwmf2png/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travispaul%2Fwmf2png/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travispaul%2Fwmf2png/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/travispaul","download_url":"https://codeload.github.com/travispaul/wmf2png/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247539055,"owners_count":20955230,"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","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","windows","wmf"],"created_at":"2024-11-05T23:38:26.880Z","updated_at":"2025-04-06T19:31:43.581Z","avatar_url":"https://github.com/travispaul.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wmf2png\n\nThis is just a simple EXE wrapped around the [GDI+ Metafile class](https://msdn.microsoft.com/en-us/library/windows/desktop/ms536391(v=vs.85).aspx). I needed to get image data out of some [.WMF files](https://msdn.microsoft.com/en-us/library/cc250370.aspx) and maybe you do too.\n\nYou can [download a Windows binary](https://us-east.manta.joyent.com/tpaul/public/windows/wmf2png.zip) or build from source as shown below.\n\n## EXE Usage\n\n```\n\u003e wmf2png.exe\n\nUsage:\n  wmf2png.exe INPUTFILE.WMF OUTPUTFILE.PNG\n```\n\n## Node.js Usage\n\nThis only works on Windows and is simply a wrapper around the EXE, but it's useful if you need to perform the conversion in Node.js (exporting records from a legacy database, etc):\n\n```\nconst\n    {readFileSync, writeFileSync} = require(\"fs\"),\n    wmf2png = require(\"./wmf2png\"),\n    input = readFileSync(\"./somefile.wmf\");\n\n// `input` must be a Buffer containing the WMF contents\nwmf2png(input, (error, output) =\u003e {\n    if (error) {\n        throw error;\n    }\n    // `output` is a new buffer with the PNG image data\n    writeFileSync(\"./sig.png\", output);\n});\n```\n\n## Build from source\n\nIf you're familiar with Visual Studio then you probably don't **NEED** [CMake](https://cmake.org/download/) but it's convienent for me:\n\n```\n\u003e mkdir build\n\u003e cd build\n\u003e cmake ..\n\u003e wmf2png.sln\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftravispaul%2Fwmf2png","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftravispaul%2Fwmf2png","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftravispaul%2Fwmf2png/lists"}