*The desired output image format needs to be JPEG.
- Error: In JPEG (.../Sample.jpg)
*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.
- DPI: 72.
- Image Size: 800 longest side.
- Canvas Size: 800x800
- Canvas Background Color: White.
- Color Profile: sRGB IEC61966-2.1
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 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"
*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"
•Tried saving the photo to PNG with the following code. Progress: (Unfortunately, the background is still black )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)
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"
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