List Info

Thread: JPG compression levels




JPG compression levels
country flaguser name
Switzerland
2007-04-02 09:25:55
Hi all

is it possible to specify different compression levels for
different
areas of a jpg in convert?

specifically I would like the edges of an image to not be
compressed at all.

TIA
Yuv
_______________________________________________
Magick-users mailing list
Magick-usersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users

Re: JPG compression levels
user name
2007-04-02 14:05:49
> specifically I would like the edges of an image to not
be compressed at all.

AFAIK, the definition of the JPEG standard does not comprise
such a 
feature. This is only offered by JPEG 2000.

Wolfgang Hugemann
_______________________________________________
Magick-users mailing list
Magick-usersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users

Re: JPG compression levels
country flaguser name
Switzerland
2007-04-02 15:38:28
Hallo Wolfgang,
thank you for your reply.

Wolfgang Hugemann wrote:
>> specifically I would like the edges of an image to
not be compressed
>> at all.
> 
> AFAIK, the definition of the JPEG standard does not
comprise such a
> feature. This is only offered by JPEG 2000.

I am a newbie, so I do not know if this is the same, but
Adobe Fireworks
claims to do something like that, and
<http://www.
xat.com/jpegopt/index.html> ("Selective
optimization -
compress some areas more than others") too.

If I am not mistaken, JPEG compresses images in blocks of
8x8 pixels?

The best idea I could come up with so far with is to create
the
different 8x8 blocks individually with different target
compressions and
then use the -drop option of jpegtran to merge them into a
single image
without loss/recompression. I will be testing the idea in
the coming hours.

Yuv

_______________________________________________
Magick-users mailing list
Magick-usersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users

Re: JPG compression levels
user name
2007-04-02 18:33:09
Yuval Levy on  wrote...
| Hi all
| 
| is it possible to specify different compression levels for
different
| areas of a jpg in convert?
| 
| specifically I would like the edges of an image to not be
compressed at all.
| 
I dodn't even know that was posible with the JPEG format!
I doubt IM convert (which calls the libjpeg library) will do
that.

It is after all a general image handler. So while it may
have some
format specific stuff it will probably not to everything
that is posible
for a specific format.


  Anthony Thyssen ( System Programmer )    <A.Thyssengriffith.edu.au>
 -----------------------------------------------------------
------------------
 "You see, wire telegraph is a kind of a very, very
long cat. You pull his
 tail in New York and his head is meowing in Los Angeles. Do
you understand
 this?  And radio operates exactly the same way: you send
signals here, they
 receive them there. The only difference is that there is no
cat."
                                                        ---
Albert Einstein
 -----------------------------------------------------------
------------------
     Anthony's Home is his Castle     http://www.cit.gu.
edu.au/~anthony/
_______________________________________________
Magick-users mailing list
Magick-usersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users

Re: JPG compression levels
user name
2007-04-03 01:56:09
> <http://www.
xat.com/jpegopt/index.html> ("Selective
optimization -
> compress some areas more than others") too.
> 
> If I am not mistaken, JPEG compresses images in blocks
of 8x8 pixels?
> 
> The best idea I could come up with so far with is to
create the
> different 8x8 blocks individually with different target
compressions and
> then use the -drop option of jpegtran to merge them
into a single image
> without loss/recompression. I will be testing the idea
in the coming hours.

I think the problem is that JPEG compression is mostly based
on dropping 
not so important frequencies after the discrete cosine
transform. And 
what frequencies are "not that important" is
jugded on the complete 
content of the picture and stored only for the complete
picture.

There is a really nice visualisation of the single steps in
JPEG Com 
pression (deplorably only in German, but you'll get through
it, I guess) 
at htt
p://www.spemaus.de/studium/visjpeg/applet.html

Greetings from Germany
Wolfgang Hugemann
_______________________________________________
Magick-users mailing list
Magick-usersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users

Re: JPG compression levels
country flaguser name
Switzerland
2007-04-10 09:04:32
Thank you, Anthony and Wolfgang. I solved the issue.

Wolfgang Hugemann wrote:
> There is a really nice visualisation of the single
steps in JPEG Com
> pression (deplorably only in German, but you'll get
through it, I guess)
> at htt
p://www.spemaus.de/studium/visjpeg/applet.html

wow! amazing! i have not gone through all of it but it is of
excellent
educational value (and it gave me a chance to refresh my
Deutsch).


Anthony Thyssen wrote:
> | specifically I would like the edges of an image to
not be compressed
> | at all.
> |
> I dodn't even know that was posible with the JPEG
format!
> I doubt IM convert (which calls the libjpeg library)
will do that.


the solution:
* produce two versions of the same image with ImageMagick,
one at
quality 100 and the other at quality 60
* use jpegtran to crop the q60, shaving off 8 pixels on each
side
* use jpegtran to merge the q60 on top of the q100
* use jpegtran to merge to a stripe

results and details at <http:
//www.photopla.net/wwp0703/stripes.php>

Greetings from Quebec
Yuv
_______________________________________________
Magick-users mailing list
Magick-usersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users

[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )