Code Monkey home page Code Monkey logo

convertto-heic's Introduction

ConvertTo-Heic

A PowerShell script that converts image files to the efficient HEIC format

Overview

The JPEG image file format is universally supported and a great way to store images. However, it is no longer the most space-efficient way to do so. The High Efficiency Image File format used by HEIC/HEIF images maintains the same quality as JPEG in roughly half the space.

ConvertTo-Heic.ps1 is a PowerShell script that uses the Windows.Graphics.Imaging API to create a HEIC-encoded copy of each image that is passed to it. (The original file is not modified.)

Related

  • ConvertTo-Jpeg.ps1: A PowerShell script that converts RAW (and other) image files to the widely-supported JPEG format

Requirements

Windows 10's April 2018 Update (version 1803) introduced support for reading HEIC/HEIF images to the Windows.Graphics.Imaging API. Windows 10's October 2018 Update (version 1809) improved support for HEIC/HEIF images, making it possible to write them. ConvertTo-Heic.ps1 requires the October 2018 Update (version 1809). To enable the encoder, install the Microsoft HEIF and HEVC Media Extensions bundle (or else both of HEVC Video Extensions and HEIF Image Extensions). Once done, the built-in Photos app (and other programs that use the Windows.Graphics.Imaging API) will be able to work with HEIC/HEIF images.

Examples

Converting Files

Passing parameters:

PS C:\T> .\ConvertTo-Heic.ps1 C:\T\Pictures\IMG_1234.BMP C:\T\Pictures\IMG_5678.CR2
C:\T\Pictures\IMG_1234.BMP -> IMG_1234.BMP.heic
C:\T\Pictures\IMG_5678.CR2 -> IMG_5678.CR2.heic

Pipeline via dir:

PS C:\T> dir C:\T\Pictures | .\ConvertTo-Heic.ps1
C:\T\Pictures\IMG_1234.BMP -> IMG_1234.BMP.heic
C:\T\Pictures\IMG_5678.CR2 -> IMG_5678.CR2.heic
C:\T\Pictures\Kitten.heic [Already HEIC]
C:\T\Pictures\Notes.txt [Unsupported]

Pipeline via Get-ChildItem:

PS C:\T> Get-ChildItem C:\T\Pictures -Filter *.BMP | .\ConvertTo-Heic.ps1
C:\T\Pictures\IMG_1234.BMP -> IMG_1234.BMP.heic

Formats

Decoder Extensions
BMP Decoder .BMP .DIB .RLE
CUR Decoder .CUR
DDS Decoder .DDS
DNG Decoder .DNG
GIF Decoder .GIF
ICO Decoder .ICO .ICON
JPEG Decoder .EXIF .JFIF .JPE .JPEG .JPG
Microsoft Camera Raw Decoder .ARW .CR2 .CRW .DNG .ERF .KDC .MRW .NEF .NRW .ORF .PEF .RAF .RAW .RW2 .RWL .SR2 .SRW
Microsoft HEIF Decoder .AVCI .AVCS .HEIC .HEICS .HEIF .HEIFS
Microsoft Webp Decoder .WEBP
PNG Decoder .PNG
TIFF Decoder .TIF .TIFF
WMPhoto Decoder .JXR .WDP

convertto-heic's People

Contributors

davidanson avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.