creimers / heic-to-jpg

CLI tool for converting HEIC images to jpg.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid Parameter - -set

swilsy opened this issue · comments

  • heic-to-jpg version: 0.1.8
  • Python version: 3.9.1
  • Operating System: Windows 10

Description

I am getting the error Invalid Parameter - -set when running heic-to-jpg on Windows 10.

What I Did

In Powershell

heic-to-jpg --src .\conversion_dir\image.heic --keep

I also tried in Gitbash. Same result.

I've tried with --keep, without --keep, using -s rather than --src, moving into the directory and just passing the file name. Same issue.

I am utilizing a Python virtual environment. I installed the heic-to-jpg package using pip.

I'm sorry, I have never ever tried this on Windows. I'll try to come by a Windows computer and give it a go.

Cause of the problem is shown in below:
https://stackoverflow.com/questions/3060205/error-invalid-parameter-fom-imagemagick-convert-on-windows/54106484

Invalid Parameter - -set was output by C:\Windows\System32\convert.exe not ImageMagick.

C:\Users\foo>where convert
C:\Program Files\ImageMagick-7.1.0-Q16-HDRI\convert.exe
C:\Windows\System32\convert.exe

I found a workaround.

convert of ImageMagick equals to magick convert.
So I modified https://github.com/creimers/heic-to-jpg/blob/v0.1.8/heic_to_jpg/cli.py#L45 and https://github.com/creimers/heic-to-jpg/blob/v0.1.8/heic_to_jpg/cli.py#L69 to

        command = [
            "magick",
            "convert",

and it works.

I don't make a pull request because I don't have macOS to test this modification.

Hello, I'm having a similar issue as @swilsy did but I am running my commands via bash.

heic-to-jpg version: 0.1.8
Python version: 3.9.1
Operating System: Windows 10
Git Bash

Description
I am getting the error Invalid Parameter - -set when running heic-to-jpg on Windows 10 via Git Bash.

What I Did
In Git Bash

heic-to-jpg --s fileimage.heic --keep

I also tried this below
I've tried with --keep, without --keep, using -s rather than --src, moving into the directory and just passing the file name. Same issue.

I am utilizing a Python virtual environment. I installed the heic-to-jpg package using pip.

Any help would be great

image