home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / graphics / 13581 < prev    next >
Encoding:
Internet Message Format  |  1993-01-08  |  4.4 KB

  1. Xref: sparky comp.graphics:13581 alt.graphics.pixutils:2872 alt.binaries.pictures.utilities:2399 alt.binaries.pictures.d:6089
  2. Path: sparky!uunet!ogicse!das-news.harvard.edu!cantaloupe.srv.cs.cmu.edu!tgl
  3. From: tgl+@cs.cmu.edu (Tom Lane)
  4. Newsgroups: comp.graphics,alt.graphics.pixutils,alt.binaries.pictures.utilities,alt.binaries.pictures.d
  5. Subject: Re: JPEG "Standard"
  6. Summary: the difference is quantization before compression
  7. Message-ID: <C0JzJJ.Hup.2@cs.cmu.edu>
  8. Date: 8 Jan 93 20:57:18 GMT
  9. Article-I.D.: cs.C0JzJJ.Hup.2
  10. References: <1ijc97INN17s@usenet.INS.CWRU.Edu> <1ijbupINN10l@usenet.INS.CWRU.Edu> <1ijc1tINN14h@usenet.INS.CWRU.Edu> <1ijc59INN155@usenet.INS.CWRU.Edu>
  11. Sender: news@cs.cmu.edu (Usenet News System)
  12. Followup-To: comp.graphics
  13. Organization: School of Computer Science, Carnegie Mellon
  14. Lines: 78
  15. Nntp-Posting-Host: g.gp.cs.cmu.edu
  16.  
  17. kxj6@po.CWRU.Edu (Kijin Jung) writes:
  18. > I was concerned about the standardization of JPEG
  19. > between two programs I have, so I did some tests.
  20. > ... I compressed them using ColorView 2.0 for DOS
  21. > and WinJPEG 1.6. (The reason why I used a quality of
  22. > 74 and 76 for Colorview was because it did not
  23. > offer 75 as an option; so I also used those settings
  24. > for WinJPEG.) Also, Cview only accepts BMP files.
  25. > Cview's JPEG output is much smaller than those of WinJPEG
  26. > for a given Quality.
  27.  
  28. I'm guessing that you proceeded by loading and displaying the image, then
  29. using "Save".  This is a bad move since both programs will quantize the
  30. 24-bit image down to 8 bits for display (assuming your display hardware is 8
  31. bits).  JPEG is intended for compressing 24-bit data, not 8-bit; your JPEG
  32. files are larger and of lower quality than they would be if you had made
  33. them directly from the Targa or BMP file.
  34.  
  35. WinJPEG has a "batch conversion" option which allows direct compression of
  36. Targa to JPEG format without a quantization step.  This is a much better
  37. means of compressing full-color images.  As far as I can tell, ColorView has
  38. no similar capability.
  39.  
  40. The difference in file size is due to Colorview and WinJPEG using different
  41. quantization algorithms; hence the data fed to the JPEG compressor is not
  42. the same.  In particular, I'd bet you had dithering turned off in ColorView.
  43.  
  44. > Which program adheres closer to the Quality settings
  45. > described in the JPEG FAQ?
  46.  
  47. ColorView and WinJPEG use the same JPEG compression software (the free JPEG
  48. code provided by the Independent JPEG Group).  Their Q scales are the same.
  49. ColorView's user interface is a little bit weird, I don't know why they
  50. chose to provide only the Q values they did.
  51.  
  52. > Exactly what is entropy optimization and how does it affect
  53. > the quality of the compressed image? (Should it be used if
  54. > I want a "standard" Q75 JPEG file?)
  55.  
  56. Entropy optimization picks an optimal Huffman code table for the particular
  57. image, instead of using a default Huffman table.  It typically makes the
  58. JPEG file a little smaller, but there is no change in image quality.  Any
  59. non-broken JPEG decoder should be able to deal with optimized files.
  60.  
  61. > I am very confused by WinJPEG's method of saving JPG's.
  62. > WinJPEG takes two original files of the same content but
  63. > different format, yet outputs JPEG files of different sizes
  64. > (with entropy optimization on).
  65.  
  66. That seems strange to me too.  Could it be that there is some history
  67. dependence in their color quantization algorithm?  Are you *sure* the
  68. BMP and Targa files are identical?
  69.  
  70. > And for those who have PhotoStyler 1.1a: how does the
  71. > quality range in the JPEG export module translate to the
  72. > quality range described in the FAQ? (PhotoStyler uses
  73. > a range from 0 to 100, with 0 being minimal compression,
  74. > 100 maximum - just the opposite of convention).
  75.  
  76. Good question.  Quality settings are not defined by the JPEG standard, they
  77. are a user interface feature that can and does vary between implementations.
  78. The quality settings described in the FAQ apply to the IJG software and
  79. programs based on it, but PhotoStyler probably wrote their own JPEG code
  80. and did something completely different.
  81.  
  82. > What the heck is the difference between YUV422 and YUV411 SubSampling?
  83.  
  84. The difference is how much the color information gets reduced.  If you have
  85. v4 of the free JPEG software (cjpeg), these formats correspond to
  86. "-sample 2x1" and "-sample 2x2" respectively.  Most decoders handle both.
  87.  
  88.             regards, tom lane
  89.  
  90. PS: learn how to do cross-posting properly.  Posting separately to each
  91. group is NOT the right way --- I still don't know if I have found all the
  92. groups that you posted in.
  93.