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

ImageMagickObject is a Windows COM+ interface to ImageMagick. COM+, Visual Basic, and Delphi users should post to this discussion group.
Post Reply
BeCoach
Posts: 2
Joined: 2016-11-30T02:16:25-07:00
Authentication code: 1151

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

Post by BeCoach » 2016-11-30T02:24:21-07:00

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 ?
Last edited by BeCoach on 2016-12-01T02:21:19-07:00, edited 1 time in total.

snibgo
Posts: 9404
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

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

Post by snibgo » 2016-11-30T11:09:41-07:00

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?
snibgo's IM pages: im.snibgo.com

BeCoach
Posts: 2
Joined: 2016-11-30T02:16:25-07:00
Authentication code: 1151

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

Post by BeCoach » 2016-12-01T02:19:52-07:00

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 :)

Post Reply