Problem setting -sampling-factor

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
alQemist
Posts: 2
Joined: 2011-03-29T16:21:47-07:00
Authentication code: 8675308

Problem setting -sampling-factor

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Problem setting -sampling-factor

Post 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
alQemist
Posts: 2
Joined: 2011-03-29T16:21:47-07:00
Authentication code: 8675308

Re: Problem setting -sampling-factor

Post by alQemist »

I've tried that too, every combination I could think of....still no go.
Post Reply