{"id":17920939,"url":"https://github.com/davidanson/convertto-jpeg","last_synced_at":"2025-04-09T12:08:26.574Z","repository":{"id":39838683,"uuid":"129685239","full_name":"DavidAnson/ConvertTo-Jpeg","owner":"DavidAnson","description":"A PowerShell script that converts RAW (and other) image files to the widely-supported JPEG format","archived":false,"fork":false,"pushed_at":"2024-08-06T03:22:02.000Z","size":9,"stargazers_count":203,"open_issues_count":6,"forks_count":47,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-02T04:59:22.774Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/DavidAnson.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}},"created_at":"2018-04-16T04:35:43.000Z","updated_at":"2025-03-10T11:06:19.000Z","dependencies_parsed_at":"2024-10-28T20:34:09.166Z","dependency_job_id":"f3b7a50f-0970-45f7-89c7-0a095c613236","html_url":"https://github.com/DavidAnson/ConvertTo-Jpeg","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/DavidAnson%2FConvertTo-Jpeg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidAnson%2FConvertTo-Jpeg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidAnson%2FConvertTo-Jpeg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DavidAnson%2FConvertTo-Jpeg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DavidAnson","download_url":"https://codeload.github.com/DavidAnson/ConvertTo-Jpeg/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248036067,"owners_count":21037092,"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":"2024-10-28T20:29:43.188Z","updated_at":"2025-04-09T12:08:26.550Z","avatar_url":"https://github.com/DavidAnson.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ConvertTo-Jpeg\n\n\u003e A PowerShell script that converts RAW (and other) image files to the widely-supported JPEG format\n\n## Overview\n\nMany cameras - and many phones - save photos in a custom file format.\nKnown as [RAW images](https://en.wikipedia.org/wiki/Raw_image_format), these files contain richer information than the widely-supported [JPEG format](https://en.wikipedia.org/wiki/JPEG) allows, but they are not as widely supported by tools.\nTo easily view, edit, or share pictures, it can be handy to convert RAW images to the JPEG format.\n\n`ConvertTo-Jpeg.ps1` is a [PowerShell](https://en.wikipedia.org/wiki/PowerShell) script that uses the [Windows.Graphics.Imaging API](https://docs.microsoft.com/en-us/uwp/api/windows.graphics.imaging) to create a JPEG-encoded copy of each image that is passed to it.\n(The original file is not modified.)\n\n## Related\n\n- [ConvertTo-Heic.ps1](https://github.com/DavidAnson/ConvertTo-Heic): A PowerShell script that converts image files to the efficient HEIC format\n\n## Examples\n\n### Converting Files\n\nPassing parameters:\n\n```PowerShell\nPS C:\\T\u003e .\\ConvertTo-Jpeg.ps1 C:\\T\\Pictures\\IMG_1234.HEIC C:\\T\\Pictures\\IMG_5678.HEIC\nC:\\T\\Pictures\\IMG_1234.HEIC -\u003e IMG_1234.HEIC.jpg\nC:\\T\\Pictures\\IMG_5678.HEIC -\u003e IMG_5678.HEIC.jpg\n```\n\nPipeline via `dir`:\n\n```PowerShell\nPS C:\\T\u003e dir C:\\T\\Pictures | .\\ConvertTo-Jpeg.ps1\nC:\\T\\Pictures\\IMG_1234.HEIC -\u003e IMG_1234.HEIC.jpg\nC:\\T\\Pictures\\IMG_5678.HEIC -\u003e IMG_5678.HEIC.jpg\nC:\\T\\Pictures\\Kitten.jpg [Already JPEG]\nC:\\T\\Pictures\\Notes.txt [Unsupported]\n```\n\nPipeline via `Get-ChildItem`:\n\n```PowerShell\nPS C:\\T\u003e Get-ChildItem C:\\T\\Pictures -Filter *.HEIC | .\\ConvertTo-Jpeg.ps1\nC:\\T\\Pictures\\IMG_1234.HEIC -\u003e IMG_1234.HEIC.jpg\nC:\\T\\Pictures\\IMG_5678.HEIC -\u003e IMG_5678.HEIC.jpg\n```\n\n### Renaming Files\n\nSometimes files have the wrong extension.\nTo rename JPEG-encoded files that don't have the standard `.jpg` extension, use the `-FixExtensionIfJpeg` \nswitch (alias `-f`). \n(The `=\u003e` in the output indicates that the file was renamed vs. converted.)\n\n```PowerShell\nPS C:\\T\u003e dir C:\\T\\Pictures\\*.HEIC | .\\ConvertTo-Jpeg.ps1 -FixExtensionIfJpeg\nC:\\T\\Pictures\\IMG_1234 (Edited).HEIC =\u003e IMG_1234 (Edited).jpg\nC:\\T\\Pictures\\IMG_1234.HEIC -\u003e IMG_1234.HEIC.jpg\n```\n\n### Removing existing extensions\n\nTo remove the existing extension of a file, use the `-RemoveOriginalExtension` switch (alias `-r`).\n\n```PowerShell\nPS C:\\T\u003e dir C:\\T\\Pictures\\*.HEIC | .\\ConvertTo-Jpeg.ps1 -RemoveOriginalExtension\nC:\\T\\Pictures\\IMG_1234.HEIC -\u003e IMG_1234.jpg\nC:\\T\\Pictures\\IMG_5678.HEIC -\u003e IMG_5678.jpg\n```\n\n## Formats\n\n| Decoder                      | Extensions |\n| ---------------------------- | ---------- |\n| BMP Decoder                  | .BMP .DIB .RLE |\n| CUR Decoder                  | .CUR |\n| DDS Decoder                  | .DDS |\n| DNG Decoder                  | .DNG |\n| GIF Decoder                  | .GIF |\n| ICO Decoder                  | .ICO .ICON |\n| JPEG Decoder                 | .EXIF .JFIF .JPE .JPEG .JPG |\n| Microsoft Camera Raw Decoder | .ARW .CR2 .CRW .DNG .ERF .KDC .MRW .NEF .NRW .ORF .PEF .RAF .RAW .RW2 .RWL .SR2 .SRW |\n| *Microsoft HEIF Decoder*     | .AVCI .AVCS .HEIC .HEICS .HEIF .HEIFS |\n| *Microsoft Webp Decoder*     | .WEBP |\n| PNG Decoder                  | .PNG |\n| TIFF Decoder                 | .TIF .TIFF |\n| WMPhoto Decoder              | .JXR .WDP |\n\n## HEIC/HEIF\n\nWindows 10's April 2018 Update (version 1803) added support for [HEIC/HEIF images](https://en.wikipedia.org/wiki/High_Efficiency_Image_File_Format) to the Windows.Graphics.Imaging API.\n`ConvertTo-Jpeg.ps1` uses the new decoder automatically if it's available.\nTo enable the decoder, install the Microsoft [HEIF and HEVC Media Extensions](https://www.microsoft.com/store/productId/9NTLD6MSD8BM) bundle (or else both of [HEVC Video Extensions](https://www.microsoft.com/store/productId/9NMZLZ57R3T7) and [HEIF Image Extensions](https://www.microsoft.com/store/productId/9PMMSR1CGPWG)).\nOnce done, the built-in Photos app (and other programs that use the Windows.Graphics.Imaging API) will be able to open HEIC/HEIF images.\n\n## WEBP\n\nIf the default support for [WebP](https://en.wikipedia.org/wiki/WebP) images is missing or incomplete, consider installing the Microsoft [Webp Image Extensions](https://www.microsoft.com/en-us/p/webp-image-extensions/9pg2dk419drg).\nAs above, the built-in Photos app is a great way to verify support for WEBP images.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidanson%2Fconvertto-jpeg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidanson%2Fconvertto-jpeg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidanson%2Fconvertto-jpeg/lists"}