Page 1 of 1

Problem setting -sampling-factor

Posted: 2011-03-29T16:31:03-07:00
by alQemist
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

Re: Problem setting -sampling-factor

Posted: 2011-03-29T17:07:53-07:00
by fmw42
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

Re: Problem setting -sampling-factor

Posted: 2011-03-30T06:34:26-07:00
by alQemist
I've tried that too, every combination I could think of....still no go.