Page 1 of 1

Bug Report: JPEG error in MacOS version of NConvert [Solved]

Posted: Mon May 01, 2023 3:35 pm
by mgegersdorfer
Converting from PNG/TIF image to JPEG produces the following error:
  • Error: In JPEG (.../Sample.jpg)
*The desired output image format needs to be JPEG.
*It does produce a .jpg file. However, there is no information in it. The file size is 0.
*I've attached sample files for anyone wanting to try.
*I don't know how to change the Color Profile with the ICC commands. So I've omitted it from this topic.
*Where it states ".../Sample.tif" I used my fully qualified path name. Substitute it with your own.


System Specs:
  • iMac Early 2009 with a pached copy of macOS Catalina.
  • Processor: 2.66 GHz Intel Core 2 Duo.
  • Memory: 8 GB 1333 MHz DDR3.
  • Graphics: NVIDIA GeForce 9400 256 MB.
  • Model Identifier: iMac9,1.
I need to be able to save TIF to JPEG with the following criteria:
  • DPI: 72.
  • Image Size: 800 longest side.
  • Canvas Size: 800x800
  • Canvas Background Color: White.
  • Color Profile: sRGB IEC61966-2.1
Tried saving the photo to JPEG with the following code. Unsuccessful:

Code: Select all

nconvert -dpi 72 -ratio -rtype linear -resize longest 800 -canvas 800 800 center -bgcolor 255 255 255 -wmopacity 10 -wmflag center -wmsize 95 -wmfile ".../Watermark.png" -out jpeg -q 90 ".../Sample.tif" 
*I get the same error when using single quotes.
*I get the same error when using a PNG image as input.
*I get the error "can't open file" when using colons in the Pathname (Does not use HFS File Paths).
*This works on my Windows 11 Platform with one hiccup. The background color is Black no matter the value I set it :( ).


Tried saving the photo to JPEG with the following simpler code. Unsuccessful:

Code: Select all

nconvert -resize longest 800 -out jpeg -q 90 ".../Sample.tif"
*The above gave me the same error message "Error: In JPEG (.../Sample.jpg)"
*I get the same error when using a PNG image as input.


Tried saving a watermark directly on top of a JPEG image with the following code. Unsuccessful:

Code: Select all

nconvert -wmopacity 7 -wmflag center -wmsize 98 -wmfile ".../Watermark.png" ".../Sample.jpg"
It gave me the below error message.
my_error_exit...<JPEG parameter struct mismatch: library thinks size is 632, caller expects 600>
my_error_exit...<JPEG parameter struct mismatch: library thinks size is 632, caller expects 600>
my_error_exit...<JPEG parameter struct mismatch: library thinks size is 632, caller expects 600>
my_error_exit...<JPEG parameter struct mismatch: library thinks size is 632, caller expects 600>
Error: Don't know how to read this picture (.../Sample.jpg)
Tried saving the photo to PNG with the following code. Progress: :? (Unfortunately, the background is still black :( )

Code: Select all

nconvert -dpi 72 -ratio -rtype linear -resize longest 800 -canvas 800 800 center -bgcolor 255 255 255 -wmopacity 10 -wmflag center -wmsize 95 -wmfile ".../Watermark.png" -out png ".../Sample.tif"
*Unfortunately, PNG images are not the final goal. It has to be in JPEG format.

I Also thought there might be something wrong with the plugins provided with nconvert.
I deleted all the Plugins in the plugin folder which came with nconvert. Then, I opened the "Show Package Contents" of the XnViewMP Application installed on the mac and copied all it's plugins into the Plugin folder with nconvert. Unfortunately, when running the code again. The same error message is produced!

Anyone know how to resolve this or am I correct to assume that this is a bug?
Reference: How to setup nconvert for use on MacOS Catalina

Re: Bug Report: JPEG error in MacOS version of NConvert

Posted: Wed May 03, 2023 7:58 pm
by mgegersdorfer
I confirm this error persists on my Work iMac.
Specs: iMac 2019 edition with a non patched macos Catalina, 27" Screen.

Re: Bug Report: JPEG error in MacOS version of NConvert

Posted: Fri May 05, 2023 8:45 am
by xnview
Please try to download the package again, i've fixed the build problem...

Re: Bug Report: JPEG error in MacOS version of NConvert

Posted: Fri May 05, 2023 4:00 pm
by mgegersdorfer
xnview wrote: Fri May 05, 2023 8:45 am Please try to download the package again, i've fixed the build problem...
Resolved: Awesome! It's fixed now. :D