{"id":25162794,"url":"https://github.com/phellams/magicgester","last_synced_at":"2025-06-26T01:33:29.441Z","repository":{"id":274258883,"uuid":"912251032","full_name":"phellams/magicgester","owner":"phellams","description":"MagicGester is a PowerShell module that provides a number of cmdlets for exporting SVG files to various formats (PNG, ICO, JPG, etc.) using specified ranges, and returning information about the exported files, magicgester requires ImageMagick and Inkscape to be installed on the system.","archived":false,"fork":false,"pushed_at":"2025-01-26T03:48:31.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T03:19:32.225Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phellams.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2025-01-05T03:09:36.000Z","updated_at":"2025-01-26T03:48:34.000Z","dependencies_parsed_at":"2025-01-26T04:23:59.566Z","dependency_job_id":"b06a86e6-e6cb-499f-9d2f-2ca8e4363323","html_url":"https://github.com/phellams/magicgester","commit_stats":null,"previous_names":["phellams/magicgester"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phellams%2Fmagicgester","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phellams%2Fmagicgester/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phellams%2Fmagicgester/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phellams%2Fmagicgester/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phellams","download_url":"https://codeload.github.com/phellams/magicgester/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247016569,"owners_count":20869671,"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":[],"created_at":"2025-02-09T03:19:34.917Z","updated_at":"2025-04-03T14:25:46.690Z","avatar_url":"https://github.com/phellams.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MagicGester \r\n\r\nMagicGester is a ***PowerShell module*** that provides a number of cmdlets for exporting SVG files to various formats 🎬 (**PNG**, **ICO**, **JPG**, **TIFF**, **WEBP**, **PDF**) using specified ranges, and returning information about the exported files.\r\n\r\n## 🏐 Installation\r\n\r\nTo install the module, run the following command in PowerShell:\r\n\r\n```powershell\r\ngit clone https://github.com/sgkens/MagicGester.git\r\ncd MagicGester\r\nImport-Module .\\\r\n```\r\n\r\n## 🏐 Usage\r\n\r\nTo use the module, import it in your PowerShell script:\r\n\r\nOnce imported, you can use the cmdlets provided by the module. For example, to export an SVG file to PNG format in specified dimensions, you can use the `Export-SvgRanges` cmdlet:\r\n\r\n\u003e SVG to PNG ranges example\r\n```powershell\r\nExport-SvgRanges -Source \"master.svg\" -Destination \"output\" -PngRanges @('16x16', '32x32', '64x64')\r\n```\r\n\u003e SVG to JPG ranges example\r\n```powershell\r\nExport-SvgRanges -Source \"master.svg\" -Destination \"output\" -JpgRanges @('16x16', '32x32', '64x64')\r\n```\r\n\r\n\u003e SVG to ICO ranges example - Max size is 256x256\r\n```powershell\r\nExport-SvgRanges -Source \"master.svg\" -Destination \"output\" -IcoRanges @('16x16', '32x32', '64x64')\r\n```\r\n\r\n\u003e SVG to TIFF ranges example\r\n```powershell\r\nExport-SvgRanges -Source \"master.svg\" -Destination \"output\" -TiffRanges @('16x16', '32x32', '64x64')\r\n```\r\n\r\n\u003e SVG to WEBP ranges example\r\n```powershell\r\nExport-SvgRanges -Source \"master.svg\" -Destination \"output\" -WebpRanges @('16x16', '32x32', '64x64')\r\n```\r\n\r\n\u003e SVG to PDF ranges example\r\n```powershell\r\nExport-SvgRanges -Source \"master.svg\" -Destination \"output\" -PdfRanges @('16x16', '32x32', '64x64')\r\n```\r\n\r\n### ⚙ Export-SvgRanges\r\n\r\nThe `Export-SvgRanges` cmdlet is used to export SVG files to various formats using specified ranges. It takes the following parameters:\r\n\r\n- `Source`: The path to the SVG file to be exported.\r\n- `Destination`: The path to the directory where the exported files will be saved.\r\n- `PngRanges`: An array of strings representing the ranges to be used for PNG export. Each range should be in the format \"widthxheight\" and should be separated by a comma.\r\n- `JpgRanges`: An array of strings representing the ranges to be used for JPG export. Each range should be in the format \"widthxheight\" and should be separated by a comma.\r\n- `IcoRanges`: An array of strings representing the ranges to be used for ICO export. Each range should be in the format \"widthxheight\" and should be separated by a comma.\r\n- `TiffRanges`: An array of strings representing the ranges to be used for TIFF export. Each range should be in the format \"widthxheight\" and should be separated by a comma.                             \r\n- `WebpRanges`: An array of strings representing the ranges to be used for WEBP export. Each range should be in the format \"widthxheight\" and should be separated by a comma.\r\n- `PdfRanges`: An array of strings representing the ranges to be used for PDF export. Each range should be in the format \"widthxheight\" and should be separated by a comma.\r\n\r\n```powershell\r\nExport-SvgRanges -Source \"master.svg\"`\r\n                 -Destination \"output\"`\r\n                 -PngRanges @('16x16', '32x32', '96x96')`\r\n                 -JpgRanges @('16x16', '32x32', '64x64')`\r\n                 -IcoRanges @('16x16', '32x32', '64x64')`\r\n                 -TiffRanges @('16x16', '32x32', '64x64')`\r\n                 -WebpRanges @('16x16', '32x32', '64x64')`\r\n                 -PdfRanges @('16x16', '32x32', '1064x1064')\r\n```\r\n\r\nOutput:\r\n\r\n```powershell\r\n    ├ Output\r\n    │  ├ ico\r\n    │  │  ├ logo-v1-16x16.ico\r\n    │  │  ├ logo-v1-32x32.ico\r\n    │  │  ├ logo-v1-64x64.ico\r\n    │  │  └ logo-v1-256x256.ico\r\n    │  ├ jpg\r\n    │  │  ├ logo-v1-16x16.jpg\r\n    │  │  ├ logo-v1-32x32.jpg\r\n    │  │  ├ logo-v1-64x64.jpg\r\n    │  │  └ logo-v1-256x256.jpg\r\n    │  ├ pdf\r\n    │  │  ├ logo-v1-16x16.pdf\r\n    │  │  ├ logo-v1-32x32.pdf\r\n    │  │  ├ logo-v1-64x64.pdf\r\n    │  │  └ logo-v1-256x256.pdf\r\n    │  ├ png\r\n    │  │  ├ logo-v1-16x16.png\r\n    │  │  ├ logo-v1-32x32.png\r\n    │  │  ├ logo-v1-64x64.png\r\n    │  │  └ logo-v1-256x256.png\r\n    │  ├ svg\r\n    │  │  ├ logo-v1-16x16.svg\r\n    │  │  ├ logo-v1-32x32.svg\r\n    │  │  ├ logo-v1-64x64.svg\r\n    │  │  └ logo-v1-256x256.svg\r\n    │  ├ tiff\r\n    │  │  ├ logo-v1-16x16.tiff\r\n    │  │  ├ logo-v1-32x32.tiff\r\n    │  │  ├ logo-v1-64x64.tiff\r\n    │  │  └ logo-v1-256x256.tiff\r\n    │  └ webp\r\n    │     ├ logo-v1-16x16.webp\r\n    │     ├ logo-v1-32x32.webp\r\n    │     ├ logo-v1-64x64.webp\r\n    │     └ logo-v1-256x256.webp\r\n```\r\nThis will export the SVG file to PNG, JPG, ICO, TIFF, WEBP, and PDF formats using the specified ranges.\r\n\r\n### ⚙ Get-ImageInfo\r\n\r\nThe `Get-ImageInfo` cmdlet is used to return information about the exported images. It takes the following parameters:\r\n\r\n- `SourcePath`: The path to the directory where the image file is located.\r\n\r\n```powershell\r\nGet-ImageInfo -SourcePath \".\\output\\ico\\logo-v1-16x16.ico\"\r\n```\r\n\r\nOutput:\r\n\r\n```powershell\r\nwhite point        : (0.3127,0.329,0.3583)\r\nGamma              : 0.454545\r\nBackground color   : white\r\nNumber pixels      : 256\r\nblue primary       : (0.15,0.06,0.79)\r\nFilename           : .\\output\\ico\\logo-v1-16x16.ico\r\nPage geometry      : 16x16+0+0\r\nEndianness         : Undefined\r\nTainted            : False\r\nred primary        : (0.64,0.33,0.03)\r\nInterlace          : None\r\nFilesize           : 1150B\r\n1                  : (197,177,171,255) #C5B1ABFF srgba(197,177,171,1)\r\nCompose            : Over\r\nBlue               : 8-bit\r\nPixels             : 256\r\nAlpha              : srgba(52,52,52,0)   #34343400\r\nkurtosis           : -0.121\r\nBase type          : Undefined\r\nType               : PaletteAlpha\r\nGeometry           : 16x16+0+0\r\nPixel cache type   : Memory\r\nPixels per second  : 145.97KP\r\nIntensity          : Undefined\r\nTransparent color  : black\r\nUser time          : 0.002u\r\nDepth              : 8-bit\r\nRendering intent   : Perceptual\r\nRed                : 8-bit\r\nstandard deviation : 60.791 (0.2384)\r\nverbose            : true\r\nClass              : DirectClass\r\ndate               : timestamp: 2025-01-05T02:17:22+00:00\r\nElapsed time       : 0:01.001\r\nFormat             : ICO (Microsoft icon)\r\nsignature          : d7db39293d78a7644c067eb0144ad873a35c0a4ecbd7a5f1cf2270a80cc88e08\r\nMatte color        : grey74\r\nmin                : 0  (0)\r\n50                 : (52,52,52,0) #34343400 srgba(52,52,52,0)\r\nGreen              : 8-bit\r\nUnits              : Undefined\r\nmedian             : 107.5 (0.42157)\r\nColorspace         : sRGB\r\nDispose            : Undefined\r\nCompression        : Undefined\r\nPermissions        : rw-rw-rw-\r\nChannels           : 4.0\r\nmean               : 104.22 (0.4087)\r\n2                  : (70,49,88,223) #463158DF srgba(70,49,88,0.87451)\r\nBorder color       : srgb(223,223,223)\r\nOrientation        : Undefined\r\nskewness           : 0.60283\r\nmax                : 255 (1)\r\nIterations         : 0\r\nVersion            : ImageMagick 7.1.1-43 Q8 x64 a2d96f4:20241222 https://imagemagick.org\r\nentropy            : 0.86121\r\nColors             : 205\r\ngreen primary      : (0.3,0.6,0.1)\r\n```\r\n\r\nThis will return an object containing information about the image file, such as its dimensions, resolution, and file size etc.\r\n\r\n## 💑 Contributing\r\n\r\nContributions are welcome! If you have any suggestions or improvements, please open an issue or submit a pull request.\r\n\r\n## 📄 License\r\n\r\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.    ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphellams%2Fmagicgester","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphellams%2Fmagicgester","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphellams%2Fmagicgester/lists"}