Skip to main content
Add a note about how to convert to jpeg instead of png
Source Link
stevec
  • 5.4k
  • 13
  • 51
  • 89

To convert all .HEIC images in a directory to .png

Open terminal. cd to the directory where the .HEIC files you want to convert are stored.

Be careful, this will convert all .HEIC files in the directory - back them up first if you're not sure you want to do that just yet.

for f in *.HEIC
do sips -s format png "${f}" --out "${f%.*}.png"
done

If you want to convert and resize images

The following will convert and resize images so the maximum height and width is 400 pixels (but you can change 400 below to any value)

Be careful, this will convert and resize all .HEIC files in the directory - back them up first if you're not sure you want to do that just yet.

for f in *.HEIC
do sips -s format png "${f}" -Z 400 --out "${f%.*}.png"
done

Reference

Additional note

To convert from HEIC to jpeg, use the same code examples above but replace png with jpeg in 2 places, and you'll have jpeg instead.

To convert all .HEIC images in a directory to .png

Open terminal. cd to the directory where the .HEIC files you want to convert are stored.

Be careful, this will convert all .HEIC files in the directory - back them up first if you're not sure you want to do that just yet.

for f in *.HEIC
do sips -s format png "${f}" --out "${f%.*}.png"
done

If you want to convert and resize images

The following will convert and resize images so the maximum height and width is 400 pixels (but you can change 400 below to any value)

Be careful, this will convert and resize all .HEIC files in the directory - back them up first if you're not sure you want to do that just yet.

for f in *.HEIC
do sips -s format png "${f}" -Z 400 --out "${f%.*}.png"
done

Reference

To convert all .HEIC images in a directory to .png

Open terminal. cd to the directory where the .HEIC files you want to convert are stored.

Be careful, this will convert all .HEIC files in the directory - back them up first if you're not sure you want to do that just yet.

for f in *.HEIC
do sips -s format png "${f}" --out "${f%.*}.png"
done

If you want to convert and resize images

The following will convert and resize images so the maximum height and width is 400 pixels (but you can change 400 below to any value)

Be careful, this will convert and resize all .HEIC files in the directory - back them up first if you're not sure you want to do that just yet.

for f in *.HEIC
do sips -s format png "${f}" -Z 400 --out "${f%.*}.png"
done

Reference

Additional note

To convert from HEIC to jpeg, use the same code examples above but replace png with jpeg in 2 places, and you'll have jpeg instead.

added 65 characters in body
Source Link
stevec
  • 5.4k
  • 13
  • 51
  • 89

This answer is what solved for me. It's based off @user3439894's extremely useful comments

To convert all .HEIC images in a directory to .png

Open terminal. cd to the directory where the .HEIC files you want to convert are stored.

Be careful, this will convert all .HEIC files in the directory - back them up first if you're not sure you want to do that just yet.

for f in *.HEIC
do sips -s format png "${f}" --out "${f%.*}.png"
done

If you want to convert and resize images

The following will convert and resize images so the maximum height and width is 400 pixels (but you can change 400 below to any value)

Be careful, this will convert and resize all .HEIC files in the directory - back them up first if you're not sure you want to do that just yet.

for f in *.HEIC
do sips -s format png "${f}" -Z 400 --out "${f%.*}.png"
done

Reference

This answer is what solved for me. It's based off @user3439894's extremely useful comments

To convert all .HEIC images in a directory to .png

Open terminal. cd to the directory where the .HEIC files you want to convert are stored.

for f in *.HEIC
do sips -s format png "${f}" --out "${f%.*}.png"
done

If you want to convert and resize images

The following will convert and resize images so the maximum height and width is 400 pixels (but you can change 400 below to any value)

for f in *.HEIC
do sips -s format png "${f}" -Z 400 --out "${f%.*}.png"
done

Reference

To convert all .HEIC images in a directory to .png

Open terminal. cd to the directory where the .HEIC files you want to convert are stored.

Be careful, this will convert all .HEIC files in the directory - back them up first if you're not sure you want to do that just yet.

for f in *.HEIC
do sips -s format png "${f}" --out "${f%.*}.png"
done

If you want to convert and resize images

The following will convert and resize images so the maximum height and width is 400 pixels (but you can change 400 below to any value)

Be careful, this will convert and resize all .HEIC files in the directory - back them up first if you're not sure you want to do that just yet.

for f in *.HEIC
do sips -s format png "${f}" -Z 400 --out "${f%.*}.png"
done

Reference

Source Link
stevec
  • 5.4k
  • 13
  • 51
  • 89

This answer is what solved for me. It's based off @user3439894's extremely useful comments

To convert all .HEIC images in a directory to .png

Open terminal. cd to the directory where the .HEIC files you want to convert are stored.

for f in *.HEIC
do sips -s format png "${f}" --out "${f%.*}.png"
done

If you want to convert and resize images

The following will convert and resize images so the maximum height and width is 400 pixels (but you can change 400 below to any value)

for f in *.HEIC
do sips -s format png "${f}" -Z 400 --out "${f%.*}.png"
done

Reference