Reducing required space of jpeg image

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
erotavlas_turbo

Reducing required space of jpeg image

Post by erotavlas_turbo »

Hi,

I use the command convert to draw text over the image. The input image is jpeg 355X288 pixels (CIF format) and it requires about 25 kbyte, after that convert command is applied the image requires 38 kbyte.
Is there a way to reduce the required space (increasing jpeg compression)?

Thank you in advance
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Reducing required space of jpeg image

Post by snibgo »

Try the "quality" option, eg:

convert in.jpg -quality 10 out.jpg
snibgo's IM pages: im.snibgo.com
erotavlas_turbo

Re: Reducing required space of jpeg image

Post by erotavlas_turbo »

Thank you very much. Do you know what is the MagickWand function that realize conversion?

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

Re: Reducing required space of jpeg image

Post by snibgo »

No, sorry. Try the MagickWand forum on:
index.php
snibgo's IM pages: im.snibgo.com
erotavlas_turbo

Re: Reducing required space of jpeg image

Post by erotavlas_turbo »

This is the solution

// set the compression quality to value (high quality = low compression)
MagickSetImageCompressionQuality(magick_wand,100);
Post Reply