Page 1 of 1

[SOLVED]JS ActiveX for Convert do not work with -quality

Posted: 2016-11-30T02:24:21-07:00
by BeCoach
Hi,

I'm trying to user IM in a JS (Windows 32bits):

Code: Select all

var im = new ActiveXObject("ImageMagickObject.MagickImage.1");
var reech = im.Convert(src, "-resize",  "1200x ", "-unsharp", "0x6+0.5+0", dest);	
like this it's work, but with the "-quality 72" param it doesn't !

Code: Select all

var reech = im.Convert(src, "-quality 72", "-resize",  "1200x ", "-unsharp", "0x6+0.5+0", dest);	
In a command box

Code: Select all

Convert 1.JPG -quality 72 -resize 1200x -unsharp 0x6+0.5+0 2.JPG
Works fine.

Need help !
PS: Why the default JPEG quality is 48% ? can i change this ?

Re: JS ActiveX for Convert do not work with -quality

Posted: 2016-11-30T11:09:41-07:00
by snibgo
Is JS Javascript? I don't use it myself, but I see you have used two separate tokens for "-unsharp" and "0x6+0.5+0". But you have just one for the combined "-quality 72". Why? What happens when you split it into two?

Re: JS ActiveX for Convert do not work with -quality

Posted: 2016-12-01T02:19:52-07:00
by BeCoach
Hi,

Yes js is for JavaScript !

And YES i'm so stupid, you were right and it's works now, i just split:
var reech = im.Convert(src, "-quality", "72", "-resize", "1000x ", "-unsharp", "0x6+0.5+0", dest);
Thank's a lot :)