I am having no luck setting the -sampling-factor for converting a tif to jpeg using PHP.
Here is my command:
"convert -sampling-factor 1x1 ".$exfilename." ".$filename;
Here is the output:
convert: Improper JPEG sampling factors 2,2
Apparently should be 1,1.. `JPEGPreDecode' @ warning/tiff.c/TIFFWarnings/706.
convert: Cannot honour JPEG sampling factors that exceed those specified.. `JPEGPreDecode' @ error/tiff.c/TIFFErrors/496.
I have tried all kinds of variations
-sampling-factor 1:1
-sampling-factor 1,1
-sampling-factor 1x1
Problem setting -sampling-factor
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Problem setting -sampling-factor
try reading in your input image then put the sampling-factor then the output. But I cannot say if that will help as I know little about -sampling-factor.
convert input.tiff -sampling-factor 1x1 output.jpg
see http://www.imagemagick.org/Usage/basics/#cmdline
convert input.tiff -sampling-factor 1x1 output.jpg
see http://www.imagemagick.org/Usage/basics/#cmdline
Re: Problem setting -sampling-factor
I've tried that too, every combination I could think of....still no go.