Welcome to PCForumz.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

What program is best at JPEG compression?

 
Goto page Previous  1, 2, 3, 4, 5
   Hardware Problem Solving Community! (Home) -> Digital Cameras RSS
Related Topics:
HP 735 - jpeg - My new HP735 camera is nice but I'm concerned that it only outputs jpeg files. Should I be Also, my dog has brown eyes and the flash gives me pictures with white-eye instead of red-eye. The red-eye removal tool doesn't work on fixing..

How many times can I save a JPEG - How many times is it still ok to save a jpeg? Also, is there a loss of data if you save as a new file instead of Thanks, Richard

Jpeg deterioration over time question? - I had read where image quality can rapidly when images are saved and reloaded in JPEG format. Can someone with some expertise in his area please go into laymen's detail? It the tiff format for high quality prints.

Fuji Finepix RAW format is a JPEG file - Fuji's RAW format is nothing more than a JPEG file renamed with a .RAF If you rename their files to .jpg they will open with any editor - no needed. See the at

Slideshow program? - This may be slightly off anyone recommend a good slideshow program? I want to make a slideshow of some wedding photos I took and I just my old program won't work right on my new computer. I'm tired of fighting with it so I am..
Next:  Digital Cameras: Converting Card type  
Author Message
HEMI-Powered

External


Since: Jul 24, 2007
Posts: 18



(Msg. 46) Posted: Sat Jul 28, 2007 12:12 am
Post subject: Re: What program is best at JPEG compression? [Login to view extended thread Info.]
Archived from groups: rec>photo>digital, others (more info?)

Bill Tuthill added these comments in the current discussion du
jour ...

> What's the difference between PSP's 2x1 1x1 1x1 and PSP's 1x2
> 1x1 1x1 encoding? I used the former, not the latter. PSP
> also has a bunch of weird encodings not encountered in other
> software.
>
My experience with PSP 8 some time ago and 9 more recently is that
1x2 creates larger files but higher quality due to less artifacts
of various types, one insidious one looking for all the world like
noise but it isn't. 2x2, OTOH, produces a much smaller file size;
you need to visually judge the difference in quality to see which
you like better. I only use 2x2 when I am desperate for smaller
size and upping the JPEG compression number is also producing
unacceptable defects. It is a big juggling act and some
experimentation may be necessary for you.

--
HP, aka Jerry

 >> Stay informed about: What program is best at JPEG compression? 
Back to top
Login to vote
Martin Brown

External


Since: Jul 27, 2007
Posts: 13



(Msg. 47) Posted: Mon Jul 30, 2007 2:30 am
Post subject: Re: What program is best at JPEG compression? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Jul 27, 2:53 pm, "HEMI-Powered" <n....RemoveThis@none.en> wrote:
> Martin Brown added these comments in the current discussion du
> jour ...
>
> >> Bill, I don't want to hit this at all hard, but I could swear
> >> that during the beta test for PSP 8, Jasc's Chief Scientist,
> >> the same guy, Kris Zaklika, that wrote the math for DCNR,
> >> said that PSP 8 could decide in a "smart" way which block
> >> size to use. I could be
>
> > Either way that statement is incredibily funny.
>
> Why is that "incredibly funny", Martin? I get the feeling that
> you are calling me a fool.

No. But I am laughing at the claim that PSPro v8 could decide in a
"smart" way which block size to use when it had one of the most broken
JPEG implementations ever seen in a commercial released product.

> > PSP 8 has a demonstrably very broken chroma subsampling
> > implementation in its JPEG codec. It is a testament to just
> > how robust JPEG is that more people have not noticed this
> > flaw.
>
> Come again? I do not know either the math or the implementation
> but NEVER had any major problems with PSP 8 during the years from
> its release until PSP 9 was released,

You were unaware of the problem. So perhaps you don't consider colour
errors a problem. Or you never use chroma subsampling AFAIK the not
subsampled 1x1 1x1 1x1 variant works OK in PSPro 8. NB Photoshop
defaults to not subsampled for the top half of its highest quality
settings and for some images there is a big step in quality there.

> > The simplest line art test to show its failings on chroma
> > encoding is to encode a pure red and pure blue 16x16 pokerdot
> > test pattern in each of the possible phases save as JPEG
> > default 2x2 subsampled at maximum quality and then reload it.
> > Half of the newly decoded image not even a vaguely
> > satisfactory approximation to the original (with gross
> > residual colour errors - completely the wrong colour bright
> > red instead of purple). 2x1 subsampling gets an even more
> > incorrect result with alternating blue and red stripes in
> > addition.
>
> I don't do line art, don't do vectors, don't do text, don't do
> layers, I ONLY do raster graphics bitmap photo/scan editing. So,
> pathological examples such as ANY JPEG implementation mangling
> line art or text does not surprise me, as that is hardly what
> it's authors had in mind. I keep in mind that the "P" in JPEG
> means "Photographer". So, I will hardly dispute your conclusions
> but do not see how that is relevant to JPEG's real purpose and
> usage, other than line art people also want mimimal size images
> as well. But, I would think that to maintain maximum quality, you
> would want to use a lossless format or even save only to your
> favorite editors proprietary format, e.g., pspsimage.

The line art example is constructed to demonstrate a specific
implementation fault in the starkest possible form. However, the
problem is still present in every colour JPEG image made with chroma
subsampling. The damage is less, but there is still unwarranted and
irrecoverable damage to the stored JPEG image coefficients.

Incidentally for some line art JPEG at highest quality not subsampled
can sometimes be the smallest file size. JPEG was designed for
photographic images, but it is quite capable of storing line art with
the right settings (although usually PNG or GIF will be more compact).

> For my car pictures, 2x2 subsampling turns them into one big
> artifact, I never touch the stuff, so never suffer from its
> limitions or damage.

Chroma subsampling tends to hit sharp red or blue colour transitions
disproportionately. And they are rather common colours for cars. But
unless you zoom in to pixel level it should be virtually invisible.
Some of the damage you are seeing could well be from a flawed JPEG
implementation. Check that the problem persists with IrfanView or
GIMP.

Regards,
Martin Brown

 >> Stay informed about: What program is best at JPEG compression? 
Back to top
Login to vote
Martin Brown

External


Since: Jul 27, 2007
Posts: 13



(Msg. 48) Posted: Mon Jul 30, 2007 2:55 am
Post subject: Re: What program is best at JPEG compression? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Jul 28, 12:02 am, Bill Tuthill <ccree... RemoveThis @yahoo.com> wrote:
> In rec.photo.digital Martin Brown <|||newspam...@nezumi.demon.co.uk> wrote:
>
> > PSP 8 has a demonstrably very broken chroma subsampling implementation
> > in its JPEG codec. It is a testament to just how robust JPEG is that
> > more people have not noticed this flaw.
>
> Thanks for your excellent explanation of the issue.
>
> > The simplest line art test to show its failings on chroma encoding is
> > to encode a pure red and pure blue 16x16 pokerdot test pattern in each
> > of the possible phases save as JPEG default 2x2 subsampled at maximum
> > quality and then reload it. Half of the newly decoded image not even a
> > vaguely satisfactory approximation to the original (with gross
> > residual colour errors - completely the wrong colour bright red
> > instead of purple). 2x1 subsampling gets an even more incorrect result
> > with alternating blue and red stripes in addition.
>
> Is 2x1 same as 4:2:2? I thought the ImageMagick -sampling_factor option
> only accepted 1x1 and 2x2, but it does accept 2x1 and produces what looks
> (to jpegdump) similar to 4:2:2 chroma subsampling from digital cameras.

2x1 is typically the encoding used by digicams. 1x2 sampling was
unknown until the lossless JPEG transcoder allowed images to be
rotated in the coefficient space. Some decoders don't decode 1x2
chroma especially well.

In principle at least a digicam could encode a Bayer mask sampled
image in a more compact form with 2Y, 1Cr, 1Cb for every 4 sensor
pixels, but the standard had no way of anticipating this development
in all digital imaging sowe are stuck with 4:2:2 where half the pixels
being stored are redundant.
>
> > The original is online athttp://www.nezumi.demon.co.uk/photo/jpeg/rb_1x1.jpg
> > Correct IJG JPEG encodinghttp://www.nezumi.demon.co.uk/photo/jpeg/rb_2x2.jpg
>
> I think you got that filename wrong.

Yes. Should be http://www.nezumi.demon.co.uk/photo/jpeg/rb_2x2_ijg.jpg

> > And the mess that PSP 8 makes of it at
> >http://www.nezumi.demon.co.uk/photo/jpeg/rb_2x1.jpg
> >http://www.nezumi.demon.co.uk/photo/jpeg/rb_2x2.jpg
> > I would be curious to know if this defect was fixed in later versions.
>
> It appears to be mostly fixed. I'm not certain that the colors are
> as accurate as with the equivalent IJG encodings, but they certainly
> don't display the wild inaccuracy of the above encodings. I put them
> online for you to see:
>
> http://cacreeks.com/psp/ (filenames hopefully self-explanatory)

There seems to be a slight residual systematic error, but it is close
enough now for all practical purposes.
>
> What's the difference between PSP's 2x1 1x1 1x1 and PSP's 1x2 1x1 1x1
> encoding? I used the former, not the latter. PSP also has a bunch of
> weird encodings not encountered in other software.

One averages the chroma in pairs horizontally and the other
vertically. Empirically it was found that for the standard 4:3 and 3:2
aspect ratios of cameras 2x1 subsampling results in a more compact
representation. The same empiricism explains why the default
quantisation matrix in the standard is not symmetrical.

I wouldn't like to comment on the weird subsampling options offered in
PSPro except to say they may not do what they say on the tin. The ones
in PSPro 8 certainly do not.

Regards,
Martin Brown
 >> Stay informed about: What program is best at JPEG compression? 
Back to top
Login to vote
Martin Brown

External


Since: Jul 27, 2007
Posts: 13



(Msg. 49) Posted: Mon Jul 30, 2007 3:27 am
Post subject: Re: What program is best at JPEG compression? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Jul 27, 2:45 pm, "HEMI-Powered" <n... RemoveThis @none.en> wrote:
> Martin Brown added these comments in the current discussion du
> jour ...
>
> >> It's not really lossless, because most images are not evenly
> >> divisible by 8 in both directions, so "lossless" rotation
> >> usually trims off some pixels rows or columns on the bottom
> >> or right side.
>
> > A good implementation of true lossless rotation refuses point
> > blank to do it if the requirements for preserving all the
> > original information are not met. For a crop it is that the
> > top left corner must start on a block boundary. Unless you are
> > eagle eyed and have fine detail crossing the edge at an
> > oblique angle you are unlikely to spot this happening casually
> > - a lossless crop need not be a multiple of 8 in dimension as
> > the bottom right corner is unrestricted.
>
> > The problem is due to a weakness in the original JPEG spec
> > which never envisaged that programs would crop or rotate
> > images in raw coefficient space. It could be almost trivially
> > fixed by adding a top and left crop offset TAG (2 bytes) to
> > the existing spec and increasing the size of the image to the
> > next higher multiple of 8/16.
>
> How big of a problem is lossy compression vs. lossles-but-with-
> severe limitations, anyway?

The limitations are no longer all that severe. And they could be
removed entirely if the standards committee decided that it was
worthwhile changing the spec to accomodate recent developments.

> Sure, I've mangled a few by over re-
> editing my JPEGs when I had no choice, and I've damaged a few
> visibly but not catasttrophically, but by doing the re-save
> judiciously and by using careful softening of the aliasing and
> artifacts that may result, I've always been able to get by.

Oh yes. An image good enough for all practical purposes should be the
target. I am generally interested in finding the smallest image of
adequate quality to be fit for purpose for a given source image.

In this respect wizards that let you compare critical parts of an
image at different compression settings and see the effects in real
time are excellent. And programs that just rename the original image
buffer but leave the original image on display are insidious and
dangerous. Too many people end up overcompressing orginal images by
accident.

> don't think I have low standards of quality, but then, I am also
> not a purist, theotician, nor extremist.

I suppose I count myself as a pragmatic purist with an interest in the
mathematics.

> > Given the number of digital cameras about these days I would
> > hazard a guess that most original source JPEG images are
> > multiples of 8 in both dimensions (and that a substantial
> > number are now multiples of 256).
>
> Since my first digital in early 2001, I have immedidately tested
> the two or more "quality" or "compression" options available and
> always come the conclusion that "standard" or "normal" produces
> visible artifacts in a high enough percenteage, maybe 5%, maybe
> 10%+, I always select "fine", "quality", whichever is the least
> compression since I do not use RAW so of necessity I will be
> doing at least one edit and one re-save. That philsophy has been
> quite successful for me in my type of photography and for my
> standards of quality and excellence.

The highest quality in camera JPEG setting is always worthwhile for
maximum flexibility. The only time I ever go down a step has been when
I was in danger of running out of media a long way from any shops. If
it is a choice between slightly inferior images or no images after
running out of media then it is a useful tradeoff in extremis. You
can't do anything similar with film - either you have an unexposed
roll or you don't - there is no option to take twice as many smaller
shots.
>
> > Digicams situation is slightly complicated by the default 2x1
> > chroma subsampling. This means that although lossless rotation
> > is exact and truly lossless some applications will display a
> > slightly different image from the rotated coefficients. So for
> > example:
>
> I have no clue what my Canon Rebel XT uses, but is seems unlikely
> that it is 2x1 as I have found that to be a fairly damaging
> setting. I don't know, but would think they use either 1x1 (none)
> or no more than 1x2.

2x1 is the default for almost all digicams (and it is for the fine
sample rebel XT image on DPreview). The Bayer filter mask makes it non-
sensical to use anything higher. You haven't measured the R or B data
with sufficient spatial resolution to merit anything more. Only Foveon
sensors or scanners sampling RGB at every pixel can justify a 1x1
subsampling.

2x1 should not normally be that damaging unless the source image is
line art with significant pixel wide blue and red stripes. 1x2 was
rarely encountered until the JPEG transcoder allowed images to be
rotated in coefficient space. They are the notation for 2 chroma
pixels average together horizontally or vertically.

Regards,
Martin Brown
 >> Stay informed about: What program is best at JPEG compression? 
Back to top
Login to vote
HEMI-Powered

External


Since: Jul 24, 2007
Posts: 18



(Msg. 50) Posted: Mon Jul 30, 2007 10:20 am
Post subject: Re: What program is best at JPEG compression? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Martin Brown added these comments in the current discussion du
jour ...

Martin, I am top-posting only because I wanted to answer
everything easily at one time. For MY work - just my work, not
saying anything about anyone elses - PSP 8 worked fine, and PSP 9
works better. I never had color/chroma problems with 8, don't
with 9. Never had excessive artifacts with either that I didn't
create by blundering to too much compression. Jasc may have made
junk software for many, but it worked fine for me. It is OK that
we disagree, if everyone agreed all the time, a dull world it
would be.

Just for the records, what do you use now? I assume it is NOT PSP
X or XI as I have heard nothing but bad comments about them since
Corel took over.

Have a great week in spite of any friendly controversy. No harm,
no foul.

> On Jul 27, 2:53 pm, "HEMI-Powered" <n... RemoveThis @none.en> wrote:
>> Martin Brown added these comments in the current discussion
>> du jour ...
>>
>> >> Bill, I don't want to hit this at all hard, but I could
>> >> swear that during the beta test for PSP 8, Jasc's Chief
>> >> Scientist, the same guy, Kris Zaklika, that wrote the math
>> >> for DCNR, said that PSP 8 could decide in a "smart" way
>> >> which block size to use. I could be
>>
>> > Either way that statement is incredibily funny.
>>
>> Why is that "incredibly funny", Martin? I get the feeling
>> that you are calling me a fool.
>
> No. But I am laughing at the claim that PSPro v8 could decide
> in a "smart" way which block size to use when it had one of
> the most broken JPEG implementations ever seen in a commercial
> released product.
>
>> > PSP 8 has a demonstrably very broken chroma subsampling
>> > implementation in its JPEG codec. It is a testament to just
>> > how robust JPEG is that more people have not noticed this
>> > flaw.
>>
>> Come again? I do not know either the math or the
>> implementation but NEVER had any major problems with PSP 8
>> during the years from its release until PSP 9 was released,
>
> You were unaware of the problem. So perhaps you don't consider
> colour errors a problem. Or you never use chroma subsampling
> AFAIK the not subsampled 1x1 1x1 1x1 variant works OK in PSPro
> 8. NB Photoshop defaults to not subsampled for the top half of
> its highest quality settings and for some images there is a
> big step in quality there.
>
>> > The simplest line art test to show its failings on chroma
>> > encoding is to encode a pure red and pure blue 16x16
>> > pokerdot test pattern in each of the possible phases save
>> > as JPEG default 2x2 subsampled at maximum quality and then
>> > reload it. Half of the newly decoded image not even a
>> > vaguely satisfactory approximation to the original (with
>> > gross residual colour errors - completely the wrong colour
>> > bright red instead of purple). 2x1 subsampling gets an even
>> > more incorrect result with alternating blue and red stripes
>> > in addition.
>>
>> I don't do line art, don't do vectors, don't do text, don't
>> do layers, I ONLY do raster graphics bitmap photo/scan
>> editing. So, pathological examples such as ANY JPEG
>> implementation mangling line art or text does not surprise
>> me, as that is hardly what it's authors had in mind. I keep
>> in mind that the "P" in JPEG means "Photographer". So, I will
>> hardly dispute your conclusions but do not see how that is
>> relevant to JPEG's real purpose and usage, other than line
>> art people also want mimimal size images as well. But, I
>> would think that to maintain maximum quality, you would want
>> to use a lossless format or even save only to your favorite
>> editors proprietary format, e.g., pspsimage.
>
> The line art example is constructed to demonstrate a specific
> implementation fault in the starkest possible form. However,
> the problem is still present in every colour JPEG image made
> with chroma subsampling. The damage is less, but there is
> still unwarranted and irrecoverable damage to the stored JPEG
> image coefficients.
>
> Incidentally for some line art JPEG at highest quality not
> subsampled can sometimes be the smallest file size. JPEG was
> designed for photographic images, but it is quite capable of
> storing line art with the right settings (although usually PNG
> or GIF will be more compact).
>
>> For my car pictures, 2x2 subsampling turns them into one big
>> artifact, I never touch the stuff, so never suffer from its
>> limitions or damage.
>
> Chroma subsampling tends to hit sharp red or blue colour
> transitions disproportionately. And they are rather common
> colours for cars. But unless you zoom in to pixel level it
> should be virtually invisible. Some of the damage you are
> seeing could well be from a flawed JPEG implementation. Check
> that the problem persists with IrfanView or GIMP.
>
> Regards,
> Martin Brown
>
>



--
HP, aka Jerry
 >> Stay informed about: What program is best at JPEG compression? 
Back to top
Login to vote
HEMI-Powered

External


Since: Jul 24, 2007
Posts: 18



(Msg. 51) Posted: Mon Jul 30, 2007 10:23 am
Post subject: Re: What program is best at JPEG compression? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Martin Brown added these comments in the current discussion du
jour ...

> On Jul 28, 12:02 am, Bill Tuthill <ccree... DeleteThis @yahoo.com> wrote:
>> In rec.photo.digital Martin Brown
>> <|||newspam...@nezumi.demon.co.uk> wrote:
>>
>> > PSP 8 has a demonstrably very broken chroma subsampling
>> > implementation in its JPEG codec. It is a testament to just
>> > how robust JPEG is that more people have not noticed this
>> > flaw.
>>
>> Thanks for your excellent explanation of the issue.
>>
>> > The simplest line art test to show its failings on chroma
>> > encoding is to encode a pure red and pure blue 16x16
>> > pokerdot test pattern in each of the possible phases save
>> > as JPEG default 2x2 subsampled at maximum quality and then
>> > reload it. Half of the newly decoded image not even a
>> > vaguely satisfactory approximation to the original (with
>> > gross residual colour errors - completely the wrong colour
>> > bright red instead of purple). 2x1 subsampling gets an even
>> > more incorrect result with alternating blue and red stripes
>> > in addition.
>>
>> Is 2x1 same as 4:2:2? I thought the ImageMagick
>> -sampling_factor option only accepted 1x1 and 2x2, but it
>> does accept 2x1 and produces what looks (to jpegdump) similar
>> to 4:2:2 chroma subsampling from digital cameras.
>
> 2x1 is typically the encoding used by digicams. 1x2 sampling
> was unknown until the lossless JPEG transcoder allowed images
> to be rotated in the coefficient space. Some decoders don't
> decode 1x2 chroma especially well.

I can neither confirm nor deny your assertation here, none of my
digitals tell me what they use. I generally do NOT use 2x2
because I find it produces too many artifacts and there is too
much of a tendency for color shifting. My two preferences at 1x2
or 1x1, both of which work fine for my car picturs.

> In principle at least a digicam could encode a Bayer mask
> sampled image in a more compact form with 2Y, 1Cr, 1Cb for
> every 4 sensor pixels, but the standard had no way of
> anticipating this development in all digital imaging sowe are
> stuck with 4:2:2 where half the pixels being stored are
> redundant.
>>
>> > The original is online
>> > athttp://www.nezumi.demon.co.uk/photo/jpeg/rb_1x1.jpg
>> > Correct IJG JPEG
>> > encodinghttp://www.nezumi.demon.co.uk/photo/jpeg/rb_2x2.jpg
>>
>> I think you got that filename wrong.
>
> Yes. Should be
> http://www.nezumi.demon.co.uk/photo/jpeg/rb_2x2_ijg.jpg
>
>> > And the mess that PSP 8 makes of it at
>> > http://www.nezumi.demon.co.uk/photo/jpeg/rb_2x1.jpg
>> > http://www.nezumi.demon.co.uk/photo/jpeg/rb_2x2.jpg I would
>> > be curious to know if this defect was fixed in later
>> > versions.
>>
>> It appears to be mostly fixed. I'm not certain that the
>> colors are as accurate as with the equivalent IJG encodings,
>> but they certainly don't display the wild inaccuracy of the
>> above encodings. I put them online for you to see:
>>
>> http://cacreeks.com/psp/ (filenames hopefully
>> self-explanatory)
>
> There seems to be a slight residual systematic error, but it
> is close enough now for all practical purposes.
>>
>> What's the difference between PSP's 2x1 1x1 1x1 and PSP's 1x2
>> 1x1 1x1 encoding? I used the former, not the latter. PSP
>> also has a bunch of weird encodings not encountered in other
>> software.
>
> One averages the chroma in pairs horizontally and the other
> vertically. Empirically it was found that for the standard 4:3
> and 3:2 aspect ratios of cameras 2x1 subsampling results in a
> more compact representation. The same empiricism explains why
> the default quantisation matrix in the standard is not
> symmetrical.
>
> I wouldn't like to comment on the weird subsampling options
> offered in PSPro except to say they may not do what they say
> on the tin. The ones in PSPro 8 certainly do not.
>
> Regards,
> Martin Brown
>
>
I have learned a lot about the math and science behind these
"strange" number strings. Thank you for taking the time to
educate a long-standing PSP user who is still (apparantly) a
relative newbie.


--
HP, aka Jerry
 >> Stay informed about: What program is best at JPEG compression? 
Back to top
Login to vote
Martin Brown

External


Since: Jul 27, 2007
Posts: 13



(Msg. 52) Posted: Mon Jul 30, 2007 2:27 pm
Post subject: Re: What program is best at JPEG compression? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Jul 30, 11:23 am, "HEMI-Powered" <n....TakeThisOut@none.en> wrote:
> Martin Brown added these comments in the current discussion du
> jour ...
>
> > On Jul 28, 12:02 am, Bill Tuthill <ccree....TakeThisOut@yahoo.com> wrote:
> >> In rec.photo.digital Martin Brown
> >> <|||newspam...@nezumi.demon.co.uk> wrote:
>
> >> > PSP 8 has a demonstrably very broken chroma subsampling
> >> > implementation in its JPEG codec. It is a testament to just
> >> > how robust JPEG is that more people have not noticed this
> >> > flaw.
>
> >> Thanks for your excellent explanation of the issue.
>
> >> > The simplest line art test to show its failings on chroma
> >> > encoding is to encode a pure red and pure blue 16x16
> >> > pokerdot test pattern in each of the possible phases save
> >> > as JPEG default 2x2 subsampled at maximum quality and then
> >> > reload it. Half of the newly decoded image not even a
> >> > vaguely satisfactory approximation to the original (with
> >> > gross residual colour errors - completely the wrong colour
> >> > bright red instead of purple). 2x1 subsampling gets an even
> >> > more incorrect result with alternating blue and red stripes
> >> > in addition.
>
> >> Is 2x1 same as 4:2:2? I thought the ImageMagick
> >> -sampling_factor option only accepted 1x1 and 2x2, but it
> >> does accept 2x1 and produces what looks (to jpegdump) similar
> >> to 4:2:2 chroma subsampling from digital cameras.
>
> > 2x1 is typically the encoding used by digicams. 1x2 sampling
> > was unknown until the lossless JPEG transcoder allowed images
> > to be rotated in the coefficient space. Some decoders don't
> > decode 1x2 chroma especially well.
>
> I can neither confirm nor deny your assertation here, none of my
> digitals tell me what they use. I generally do NOT use 2x2

If it is the Canon Rebel EOS 350D then the images are 2x1 chroma
subsampled. It isn't an assertion either it is a statement of fact
that anyone with appropriate tools can verify for themselves.

Utilities like JPEGDUMP or DUMPJPEG and their ilk will display the
header info in human readable form (even if most of it may look like
gobbledegook). There is something slightly odd about the example files
from this camera at DPReview - they seem to crash at least one old
JPEG header analysis program with a curious message of finding two SOI
markers. The IJG version works OK though and will display the
subsampling details.

It appears to contain nested JPEG thumbnails 160x120 and 432x288 as
well as the main 3456x2304 stream. I haven't investigated why this
distresses the older program. And it doesn't affect normal JPEG
decoding.

Regards,
Martin Brown
 >> Stay informed about: What program is best at JPEG compression? 
Back to top
Login to vote
Bill Tuthill

External


Since: Jul 19, 2007
Posts: 13



(Msg. 53) Posted: Mon Jul 30, 2007 5:51 pm
Post subject: Re: What program is best at JPEG compression? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In rec.photo.digital Martin Brown <|||newspam|||@nezumi.demon.co.uk> wrote:
>
> Utilities like JPEGDUMP or DUMPJPEG and their ilk will display the
> header info in human readable form (even if most of it may look like
> gobbledegook).

Martin, while I've got you reading this thread, please let me ask
a somewhat related question.

Photoshop, and to a lesser extent certain digital camera, create JPEG
where qtable0 and qtable1 have different "quality factor" ratings.

Whereas the excellent IJG libraries used by GIMP, ImageMagick, Irfanview
(etc.) seldom or never do this. Qtable0 and qtable1 always seem to have
the same "approximate quality factor", as jpegdump says.

Is it possible for the IJG libraries to create JPEG with different
quality factors in qtable0 and qtable1? Is it just that applications
written on top of IJG do not make use of this knob?
 >> Stay informed about: What program is best at JPEG compression? 
Back to top
Login to vote
Martin Brown

External


Since: Jul 27, 2007
Posts: 13



(Msg. 54) Posted: Tue Jul 31, 2007 1:25 am
Post subject: Re: What program is best at JPEG compression? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Jul 31, 1:51 am, Bill Tuthill <ccree... RemoveThis @yahoo.com> wrote:
> In rec.photo.digital Martin Brown <|||newspam...@nezumi.demon.co.uk> wrote:
>
> > Utilities like JPEGDUMP or DUMPJPEG and their ilk will display the
> > header info in human readable form (even if most of it may look like
> > gobbledegook).
>
> Martin, while I've got you reading this thread, please let me ask
> a somewhat related question.
>
> Photoshop, and to a lesser extent certain digital camera, create JPEG
> where qtable0 and qtable1 have different "quality factor" ratings.

Yes. Various makers have decided that they can do slightly better on
quality/size trade off than by scaling the original canonical JPEG
standard "example" quantisation tables. For my money the Qtables
should be symmetric, and the standard should have specified that a
JPEG stream starts off with the default Huffman tables and Qtables set
to the standard defaults perhaps with an optional 0..100 scaling tag.

It would save a useful chunk of space off the front of every small
JPEG icon and thumbnail on the web had the "example" settings for
these parameters in the standard been adopted as defaults.

The standard writers did not anticipate that everyone would adopt
their example tables verbatim.

> Whereas the excellent IJG libraries used by GIMP, ImageMagick, Irfanview
> (etc.) seldom or never do this. Qtable0 and qtable1 always seem to have
> the same "approximate quality factor", as jpegdump says.
>
> Is it possible for the IJG libraries to create JPEG with different
> quality factors in qtable0 and qtable1? Is it just that applications
> written on top of IJG do not make use of this knob?

The IJG library provides two interfaces for setting quantisation
tables -

The quality factor 1..100 which is used to rescale the both the
standard default qtables according to taste which is what most (all?)
normal applications use. Some have maximum quality 0 or 1 and some
have it at 100. It scales both the luminance and chroma tables by the
same factor (which is usually the right thing to do).

The second wizard interface allows you to set the quantisation tables
explicitly to any set of values you like. It should come with a health
warning that bad choices will result in very poor results.

DOS command line program CJPEG which comes with the main distribution
of IJG with wizard switches -qtables or -qslots will let you play
around directly with unusual quantisation tables.

I reckon it was overkill to have square quantisation tables with 64
components. Imposing diagonal symmetry and storing only the 36 upper
diagonal quantisation values would be a very reasonable thing to do.
ISTR Adobe qtables are all symmetric (or at least all the ones I have
ever seen are).

Regards,
Martin Brown
 >> Stay informed about: What program is best at JPEG compression? 
Back to top
Login to vote
Martin Brown

External


Since: Jul 27, 2007
Posts: 13



(Msg. 55) Posted: Tue Jul 31, 2007 6:25 am
Post subject: Re: What program is best at JPEG compression? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Jul 31, 12:56 pm, "HEMI-Powered" <n....DeleteThis@none.en> wrote:
> Martin Brown added these comments in the current discussion du
> jour ...
>
> > If it is the Canon Rebel EOS 350D then the images are 2x1
> > chroma subsampled. It isn't an assertion either it is a
> > statement of fact that anyone with appropriate tools can
> > verify for themselves.
>
> That is what mine is. I understand that 350D is the name outside
> the U.S. and it is Rebel XT here. Is that right?

I think that is the case, but maybe there are some other differences.
US domestic "pet" names for cameras are something of a mystery to me.
I can't see what is wrong with calling it Canon 350D.

Regards,
Martin Brown
 >> Stay informed about: What program is best at JPEG compression? 
Back to top
Login to vote
Bill Tuthill

External


Since: Jul 19, 2007
Posts: 13



(Msg. 56) Posted: Tue Jul 31, 2007 10:26 am
Post subject: Re: What program is best at JPEG compression? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In rec.photo.digital Martin Brown <|||newspam|||@nezumi.demon.co.uk> wrote:
> I reckon it was overkill to have square quantisation tables with 64
> components. Imposing diagonal symmetry and storing only the 36 upper
> diagonal quantisation values would be a very reasonable thing to do.
> ISTR Adobe qtables are all symmetric (or at least all the ones I have
> ever seen are).

Au contraire, Photoshop writes symmetric quantisation tables
only at the very highest settings, maybe 11 and 12? I could check
if it's important. However I see a lot of Photoshop JPEG images
with qtable0 at 88 and qtable1 at 91 with 1x1 chroma.

When rewriting these, I have not studied whether to compromise and
save at 89-90, or take the higher number 91. GIMP does not offer
asymmetric saveAs. Best to use Photoshop itself, probably Q = 10.

Thanks for all your answers.
 >> Stay informed about: What program is best at JPEG compression? 
Back to top
Login to vote
HEMI-Powered

External


Since: Jul 24, 2007
Posts: 18



(Msg. 57) Posted: Tue Jul 31, 2007 11:56 am
Post subject: Re: What program is best at JPEG compression? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Martin Brown added these comments in the current discussion du
jour ...

> If it is the Canon Rebel EOS 350D then the images are 2x1
> chroma subsampled. It isn't an assertion either it is a
> statement of fact that anyone with appropriate tools can
> verify for themselves.

That is what mine is. I understand that 350D is the name outside
the U.S. and it is Rebel XT here. Is that right? I said
originally that I didn't know the Chroma subsampling my Rebel
uses, and up to this very minute, I didn't. I also said that I
have never seen any real damage to images coming out of my
camera, but I HAVE seen damage when I use 2x2 with PSP 9, so
perhaps it is PSP that is misprogrammed, not the Rebel and not
the general standard.

> Utilities like JPEGDUMP or DUMPJPEG and their ilk will display
> the header info in human readable form (even if most of it may
> look like gobbledegook). There is something slightly odd about
> the example files from this camera at DPReview - they seem to
> crash at least one old JPEG header analysis program with a
> curious message of finding two SOI markers. The IJG version
> works OK though and will display the subsampling details.
>
> It appears to contain nested JPEG thumbnails 160x120 and
> 432x288 as well as the main 3456x2304 stream. I haven't
> investigated why this distresses the older program. And it
> doesn't affect normal JPEG decoding.
>
> Regards,
> Martin Brown
>
>



--
HP, aka Jerry
 >> Stay informed about: What program is best at JPEG compression? 
Back to top
Login to vote
Martin Brown

External


Since: Jul 27, 2007
Posts: 13



(Msg. 58) Posted: Wed Aug 01, 2007 1:58 am
Post subject: Re: What program is best at JPEG compression? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Jul 31, 6:26 pm, Bill Tuthill <ccree....TakeThisOut@yahoo.com> wrote:
> In rec.photo.digital Martin Brown <|||newspam...@nezumi.demon.co.uk> wrote:
>
> > I reckon it was overkill to have square quantisation tables with 64
> > components. Imposing diagonal symmetry and storing only the 36 upper
> > diagonal quantisation values would be a very reasonable thing to do.
> > ISTR Adobe qtables are all symmetric (or at least all the ones I have
> > ever seen are).
>
> Au contraire, Photoshop writes symmetric quantisation tables
> only at the very highest settings, maybe 11 and 12? I could check

I was referring to the internal 64 numbers in the Adobe quantisation
matrix which have a diagonal symmetry.
It is a 8x8 square matrix and q[i,j] = q[j,i]

In essence it seems reasonable that the quantisation of an image
should not depend on whether you photograph it in landscape or
portrait modes (or at any other oblique angle for that matter). You
can make a reaonable case on symmetry grounds from the 3,4,5 triangle
that q[0,5] = q[5,0] = q[3,4] = q[4,3]

The scaling and matrices used for luminence and chroma are quite
different. Empirically it works best that way.

> if it's important. However I see a lot of PhotoshopJPEGimages
> with qtable0 at 88 and qtable1 at 91 with 1x1 chroma.

That is because Photoshop doesn't use scaled versions of the standard
tables.
>
> When rewriting these, I have not studied whether to compromise and
> save at 89-90, or take the higher number 91. GIMP does not offer
> asymmetric saveAs. Bestto use Photoshop itself, probably Q = 10.

I would suggest choosing for the closest match on the intensity
channel but it will still introduce a significant requantisation hit.
Once it is a Photoshop image, best to resave a JPEG at the same
original level if you must.

If you want to send me a set of tiny 16x16 images compressed at each
of the 12 different levels of the current Photoshop release I will
compute what their approximate IJG equivalent is. The public utility
DUMPJPEG doesn't give very accurate answers on coarse quantised
heavily compressed images.

Regards,
Martin Brown
(the strange reply-to address is valid provided you don't alter it at
all)
 >> Stay informed about: What program is best at JPEG compression? 
Back to top
Login to vote
Bill Tuthill

External


Since: Jul 19, 2007
Posts: 13



(Msg. 59) Posted: Wed Aug 01, 2007 10:26 am
Post subject: Re: What program is best at JPEG compression? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In rec.photo.digital Martin Brown <|||newspam|||@nezumi.demon.co.uk> wrote:
>
> If you want to send me a set of tiny 16x16 images compressed at each
> of the 12 different levels of the current Photoshop release I will
> compute what their approximate IJG equivalent is. The public utility
> DUMPJPEG doesn't give very accurate answers on coarse quantised
> heavily compressed images.

Deal. Thanks very much. Do you want the red/blue squares 16x16,
or something else?

Gordon Richardson's article http://photo.net/learn/jpeg/
contains this similar information, but note 10 is missing:
<QUOTE>
Photoshop Jpeg's do not use the IJG tables, so their
equivalent quality can only be estimated:

48X32_12: Approximate quality 98 horizontal sampling 1
48X32_11: Approximate quality 94 horizontal sampling 1
48X32_09: Approximate quality 91 horizontal sampling 1
48X32_08: Approximate quality 88 horizontal sampling 1
48X32_07: Approximate quality 83 horizontal sampling 1
48X32_06: Approximate quality 86 horizontal sampling 2
48X32_05: Approximate quality 82 horizontal sampling 2
48X32_04: Approximate quality 77 horizontal sampling 2
48X32_03: Approximate quality 73 horizontal sampling 2
48X32_02: Approximate quality 62 horizontal sampling 2
48X32_01: Approximate quality 52 horizontal sampling 2
</QUOTE>
 >> Stay informed about: What program is best at JPEG compression? 
Back to top
Login to vote
Martin Brown

External


Since: Jul 27, 2007
Posts: 13



(Msg. 60) Posted: Thu Aug 02, 2007 1:22 am
Post subject: Re: What program is best at JPEG compression? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Aug 1, 6:26 pm, Bill Tuthill <ccree... DeleteThis @yahoo.com> wrote:
> In rec.photo.digital Martin Brown <|||newspam...@nezumi.demon.co.uk> wrote:
>
> > If you want to send me a set of tiny 16x16 images compressed at each
> > of the 12 different levels of the current Photoshop release I will
> > compute what their approximate IJG equivalent is. The public utility
> > DUMPJPEG doesn't give very accurate answers on coarse quantised
> > heavily compressed images.
>
> Deal. Thanks very much. Do you want the red/blue squares 16x16,
> or something else?

Hi Bill,

Anything will do - although you may find it amusing to try the red/
blue pattern out on levels 6,7.
White cat in snowstorm or black cat in coal cellar will be marginally
smaller. Just dump them in a directory and post the URL if that is
more convenient for you.
>
> Gordon Richardson's articlehttp://photo.net/learn/jpeg/
> contains this similar information, but note 10 is missing:
> <QUOTE>
> Photoshop Jpeg's do not use the IJG tables, so their
> equivalent quality can only be estimated:
>
> 48X32_12: Approximate quality 98 horizontal sampling 1
> 48X32_11: Approximate quality 94 horizontal sampling 1
> 48X32_09: Approximate quality 91 horizontal sampling 1
> 48X32_08: Approximate quality 88 horizontal sampling 1
> 48X32_07: Approximate quality 83 horizontal sampling 1
> 48X32_06: Approximate quality 86 horizontal sampling 2
> 48X32_05: Approximate quality 82 horizontal sampling 2
> 48X32_04: Approximate quality 77 horizontal sampling 2
> 48X32_03: Approximate quality 73 horizontal sampling 2
> 48X32_02: Approximate quality 62 horizontal sampling 2
> 48X32_01: Approximate quality 52 horizontal sampling 2
> </QUOTE>

They look very believable. I have the figures for the old 10 level
Photoshop somewhere, but I would like to see if the new version is
doing anything different. Thanks for your help. Obviously there are
more levles now.

BTW Certain versions of Photoshop appear not to recognise their own
embedded JPEG thumbnails - something odd about the NASA workflow nests
multiple identical thumbnails in some of their published images.

Regards,
Martin Brown
 >> Stay informed about: What program is best at JPEG compression? 
Back to top
Login to vote
Display posts from previous:   
   Hardware Problem Solving Community! (Home) -> Digital Cameras All times are: Pacific Time (US & Canada) (change)
Goto page Previous  1, 2, 3, 4, 5
Page 4 of 5

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]