|
Graphic file formats test page: JPEG-2000
This page has been developed in response to a discussion thread on the MapHist list concerning the best graphics formats available to individuals and small organizations who wish to digitize maps for the Web.
In particular, antique maps pose unique problems for those of us wanting to post images of sufficient quality that they can be used for serious research and scholarship.
My own needs in this area have constrained the tests done and reported on here.
I tend to work mostly with vintage maps engraved for publication during the early modern period. One such map Captain John Smith’s map of Virginia, engraved by William Hole in 1606, and printed in 1612, 1624, and 1625 is my first test image, and exemplifies the sort of problems I face in trying to make complex and extremely busy images readable online, and also deliverable, in a reasonable time frame, over a dial-up 56Kbps modem.
Smith’s map is a grayscale image of such astounding detail that it benefits from electronic enhancement. New digital technologies make it possible for scholars with limited access to the original prints held in rare books collections to scrutinize Smith’s map of Virginia at will. Plus, electronic magnification makes it easier to locate particular placenames such as Democrites tree and Burtons Mount two toponyms of special interest to me, which Smith added to the copy of the map published in the 1624 edition of his Generall Historie of Virginia, New-England, and the Summer Isles. I was able to find both callouts relatively easily when viewing my original digital file, a TIFF image of 4.56MB.
My second test case Adriaen Block’s map of the North American Atlantic coast, dated 1614 is a true color image, and one which I have already posted to she-philosopher.com (Gallery Cat. No. 62), as an “enlarged” (i.e., full size) image compressed to 681.9KB. At 8.24MB, the original full-size TIFF file is almost twice the size of Smith’s map (4.56MB), and is the type of image well-served by JPEG compression schemes.
There are now numerous graphics formats available to Web developers, but I have chosen to use only those which are tried-and-true standards and browser-compliant (for now, GIF, JPEG, and PNG). While hardly in this category, JPEG-2000 which produces compressed images of excellent quality looks to become the next graphics format widely supported by Web browsers.
At present, JPEG-2000 files do not display reliably on desktop computers without installed graphics software (e.g., paint and draw programs) or independent viewers such as IrfanView and XnView. I would recommend the freeware viewers, IrfanView and XnView, to all those who have Windows-based systems, regardless of whether or not you plan to experiment with the JPEG-2000 format. But it should be pointed out that without some means of viewing images other than your Web browser, the JPEG-2000 test images available here probably won’t display.
To transcode my JPEG-2000 test images, I have chosen three accessible, non-server-based tools, all of which are free for non-commercial use:
- the JPEG-2000 plug-in for Photoshop from Lead Technologies
- the JPEG-2000 codec (encoder/decoder) that comes standard with XnView, and
- the LuraWave JPEG-2000 codec from LuraTech that also comes with XnView.
I continue to avoid geo-mapping software that requires server-side technology to implement, although some of this (such as ka-Map) looks promising for larger institutional users.
Of the three tools I have tested, Lead Technologies’ Photoshop plug-in gives the best results. Its JP2/J2K driver includes advanced settings for decompression level and tile size, plus bits per pixel, not available in XnView’s JP2 and LuraWave JP2 drivers (which only allow you to set compression rate and/or quality).
I have juxtaposed the resulting JPEG-2000 test files with JPEG, GIF, and PNG files of comparable quality, also created in Photoshop and XnView from the same two TIFF originals (4.56MB and 8.24MB) used to generate the JPEG-2000 files.
In general, JPEG-2000 compression schemes out-perform those of JPEG, GIF and PNG, especially when it comes to compressing grayscale images such as the Smith map of Virginia.
When compressing 24-bit color images, Photoshop’s JPEG technology is still a very strong contender, and because its JPG files already display reliably in all Web browsers, I will continue to use it to generate the bulk of images posted to she-philosopher.com. However, based on the following test results, I do intend to begin offering a JPEG-2000 alternative in addition to the enlarged JPG images available in she-philosopher.com GALLERY exhibits.
A final cautionary note: when reviewing the tabulated results and supporting test data below, please keep in mind that numbers and results are context-dependent, and cannot be applied universally to all images of this or that kind.
Different images may well require different trade-offs between quality and compression, depending on purpose and intent. For example, with the Block map, I was more concerned with maintaining the integrity of text than I was that of color; different scholars might well have made different trade-offs, choosing fidelity to color hue and saturation over fidelity to text.
|
|
|
|
test case #1: Grayscale image
(8-bit color = 256 colors)
Capt. John Smith’s map of Virginia (as reprinted in 1624)
Size of original image (TIF file):
- 2480 x 1925 pixels
- 4,786,616 bytes (4.56MB)
JPEG-2000 compression: JP2 file format
A NOTE ON SETTINGS FOR:
Lead JP2 driver for Photoshop (plug-in)
· text starts degrading above a compression ratio of 25
PREFERRED = setting of 5
· text starts degrading above a quality factor of 25
PREFERRED = setting of 2
· 8-bit setting (bits per pixel option) produces better compression with a grayscale image (default is 24-bit)
PREFERRED = 8 bits per pixel
· best file compression achieved with highest settings for decompression level (range is from 1 to 7, with default of 5)
PREFERRED = setting of 7
· best file compression achieved with larger tile sizes (default is 640x480)
PREFERRED = 1480x1925 (same as image size)
· progressing order option does not affect compression file size, but only how an image loads and decompresses (default is quality-axis order, where image starts out blurry and becomes clearer and more detailed as additional data is decoded)
PREFERRED = quality-axis order (default)
XnView JP2 driver
· text starts degrading below a compression rate of 1 to 15
PREFERRED = setting of 1 to 20
· text starts degrading below a quality of 90
PREFERRED = setting of 90
XnView Lura JP2 driver
· text starts degrading above a compression rate of 1 to 5
PREFERRED = setting of 1 to 5
RESULTING TEST FILES:
- compressed file = 588,814 bytes (575.0KB)
SmithMap_LeadCR5GSaDL7t2480x1925.jp2
file compressed in Photoshop using LEAD Technologies JP2 plug-in
driver settings: lossy data compression (compression ratio of 5, 8 bits per pixel, decompression level of 7, tile size of 2480x1925)
- compressed file = 588,814 bytes (575.0KB)
SmithMap_LeadQF2GSaDL7t2480x1925.jp2
file compressed in Photoshop using LEAD Technologies JP2 plug-in
driver settings: lossy data compression (quality factor of 2, 8 bits per pixel, decompression level of 7, tile size of 2480x1925)
- compressed file = 764,144 bytes (746.2KB)
SmithMap_XnVq90.jp2
file compressed in XnView using its standard JPEG-2000 JP2 driver
driver settings: quality of 90
- compressed file = 954,578 bytes (932.2KB)
SmithMap_XnV1to20.jp2
file compressed in XnView using its standard JPEG-2000 JP2 driver
driver settings: compression rate of 1 to 20
- compressed file = 954,800 bytes (932.4KB)
SmithMap_XnVLura1to05.jp2
file compressed in XnView using its LuraWave JPEG-2000 JP2 driver
driver settings: compression rate of 1 to 5
- compressed file = 954,875 bytes (932.5KB)
SmithMap_LeadCR5GS.jp2
file compressed in Photoshop using LEAD Technologies JP2 plug-in
driver settings: lossy data compression (compression ratio of 5, 8 bits per pixel, NO advanced options)
- compressed file = 1,512,273 bytes (1.44MB)
SmithMap_LeadQF2GS.jp2
file compressed in Photoshop using LEAD Technologies JP2 plug-in
driver settings: lossy data compression (quality factor of 2, 8 bits per pixel, NO advanced options)
- compressed file = 3,035,923 bytes (2.90MB)
SmithMap_XnVLuraLOSSLESS.jp2
file compressed in XnView using its LuraWave JPEG-2000 JP2 driver
driver settings: lossless compression
- compressed file = 3,035,939 bytes (2.90MB)
SmithMap_XnVLOSSLESS.jp2
file compressed in XnView using its standard JPEG-2000 JP2 driver
driver settings: lossless compression
- compressed file = 3,044,412 bytes (2.90MB)
SmithMap_LeadLOSSLESSgs.jp2
file compressed in Photoshop using LEAD Technologies JP2 plug-in
driver settings: lossless compression, 8 bits per pixel, NO advanced options
JPEG-2000 compression: J2K file format
This is an alternative file format to JP2, and may render better in some browsers.
A NOTE ON SETTINGS FOR:
Lead J2K driver for Photoshop (plug-in)
· text starts degrading above a compression ratio of 25
PREFERRED = setting of 5
· text starts degrading above a quality factor of 25
PREFERRED = setting of 2
· 8-bit setting (bits per pixel option) produces better compression with a grayscale image (default is 24-bit)
PREFERRED = 8 bits per pixel
· best file compression achieved with highest settings for decompression level (range is from 1 to 7, with default of 5)
PREFERRED = setting of 7
· best file compression achieved with larger tile sizes (default is 640x480)
PREFERRED = 1480x1925 (same as image size)
· progressing order option does not affect compression file size, but only how an image loads and decompresses (default is quality-axis order, where image starts out blurry and becomes clearer and more detailed as additional data is decoded)
PREFERRED = quality-axis order (default)
RESULTING TEST FILES:
- compressed file = 588,685 bytes (574.89KB)
SmithMap_LeadCR5GSaDL7t2480x1925.j2k
file compressed in Photoshop using LEAD Technologies J2K plug-in
driver settings: lossy data compression (compression ratio of 5, 8 bits per pixel, decompression level of 7, tile size of 2480x1925)
- compressed file = 588,685 bytes (574.89KB)
SmithMap_LeadQF2GSaDL7t2480x1925.j2k
file compressed in Photoshop using LEAD Technologies J2K plug-in
driver settings: lossy data compression (quality factor of 2, 8 bits per pixel, decompression level of 7, tile size of 2480x1925)
- compressed file = 954,746 bytes (932.4KB)
SmithMap_LeadCR5GS.j2k
file compressed in Photoshop using LEAD Technologies J2K plug-in
driver settings: lossy data compression (compression ratio of 5, 8 bits per pixel, NO advanced options)
- compressed file = 1,512,144 bytes (1.44MB)
SmithMap_LeadQF2GS.j2k
file compressed in Photoshop using LEAD Technologies J2K plug-in
driver settings: lossy data compression (quality factor of 2, 8 bits per pixel, NO advanced options)
- compressed file = 3,044,283 bytes (2.90MB)
SmithMap_LeadLOSSLESSgs.j2k
file compressed in Photoshop using LEAD Technologies J2K plug-in
driver settings: lossless compression, 8 bits per pixel, NO advanced options
JPEG compression: JPG file format
A NOTE ON SETTINGS FOR:
Photoshop “Save for Web” JPG driver
· text begins to degrade below medium quality (options are low, medium, high, maximum)
PREFERRED = medium
XnView JPG driver
· text begins to degrade below a quality of 50 (although even at a quality of 30, image text is still readable)
PREFERRED = setting of 60
RESULTING TEST FILES:
- compressed file = 523,802 bytes (511.5KB)
SmithMap_PhotoshopLOW.jpg
file compressed in Photoshop using its “Save for Web” JPG file format driver
driver settings: defaults for low quality
- compressed file = 578,424 bytes (564.9KB)
SmithMap_XnVq30.jpg
file compressed in XnView using its standard JPG file format driver
driver settings: quality of 30
- compressed file = 833,135 bytes (813.6KB)
SmithMap_PhotoshopMED.jpg
file compressed in Photoshop using its “Save for Web” JPG file format driver
driver settings: defaults for medium quality
- compressed file = 856,786 bytes (836.7KB)
SmithMap_XnVq60.jpg
file compressed in XnView using its standard JPG file format driver
driver settings: quality of 60
- compressed file = 1,205,416 bytes (1.15MB)
SmithMap_XnVq80.jpg
file compressed in XnView using its standard JPG file format driver
driver settings: quality of 80 (default)
GIF compression: GIF file format
A NOTE ON SETTINGS FOR:
Photoshop “Save for Web” GIF driver
· text begins to degrade with automatic selection of 16 colors and below (options are: 8 colors, 16 colors, 32 colors, 64 colors, 128 colors, 256 colors)
PREFERRED = 32 colors
XnView GIF driver (one output only; lacks any compression options for grayscale images)
RESULTING TEST FILES:
- compressed file = 1,789,505 bytes (1.71MB)
SmithMap_Photoshop16CLR.gif
file compressed in Photoshop using its “Save for Web” GIF file format driver
driver settings: 16 (automatically selected) colors
- compressed file = 2,684,431 bytes (2.56MB)
SmithMap_Photoshop32CLR.gif
file compressed in Photoshop using its “Save for Web” GIF file format driver
driver settings: 32 (automatically selected) colors
- compressed file = 4,065,059 bytes (3.88MB)
SmithMap_XnV.gif
file compressed in XnView using its standard GIF file format driver
driver settings: default
PNG compression: PNG file format
A NOTE ON SETTINGS FOR:
Photoshop PNG driver (one output only; no options for setting compression levels)
XnView PNG driver
· compression levels range from 19, with little noticeable variation in image quality
PREFERRED = 9
RESULTING TEST FILES:
- compressed file = 3,227,993 bytes (3.08MB)
SmithMap_XnVc9.png
file compressed in XnView using its standard PNG file format driver
driver settings: compression level of 9
- compressed file = 3,451,119 bytes (3.29MB)
SmithMap_Photoshop.png
file compressed in Photoshop using its PNG file format driver
driver settings: default
- compressed file = 3,475,307 bytes (3.31MB)
SmithMap_XnVc1.png
file compressed in XnView using its standard PNG file format driver
driver settings: compression level of 1
test case #2: Full Color image
(24-bit color = 16.7 million colors)
Adriaen Block’s map of the North American Atlantic coast (1614)
Size of original image (TIF file):
- 1430 x 2012 pixels
- 8,643,224 bytes (8.24MB)
JPEG-2000 compression: JP2 file format
A NOTE ON SETTINGS FOR:
Lead JP2 driver for Photoshop (plug-in)
· text starts degrading above a compression ratio of 40 (although even at a ratio of 70, image text is still readable)
PREFERRED = setting of 10
· text starts degrading above a quality factor of 20
PREFERRED = setting of 10
· 24-bit setting (bits per pixel option) produces better compression with a true color image (default is 24-bit)
PREFERRED = 24 bits per pixel
· best file compression achieved with highest settings for decompression level (range is from 1 to 7, with default of 5)
PREFERRED = setting of 7
· best file compression achieved with larger tile sizes (default is 640x480)
PREFERRED = 1430x2012 (same as image size)
· progressing order option does not affect compression file size, but only how an image loads and decompresses (default is quality-axis order, where image starts out blurry and becomes clearer and more detailed as additional data is decoded)
PREFERRED = quality-axis order (default)
XnView JP2 driver
· text starts degrading below a compression rate of 1 to 5 (although even at a rate of 1 to 3, image text is still readable)
PREFERRED = setting of 1 to 10
· text starts degrading below a quality of 60 (although even at a quality of 40, image text is still readable)
PREFERRED = setting of 80
XnView Lura JP2 driver
· text starts degrading above a compression rate of 1 to 30 (although even at a rate of 1 to 60, image text is still readable), and color starts degrading at a compression rate of 1 to 50
PREFERRED = setting of 1 to 10
RESULTING TEST FILES:
- compressed file = 188,110 bytes (183.7KB)
BlockMap_LeadCR10aDL7t1430x2012.jp2
file compressed in Photoshop using LEAD Technologies JP2 plug-in
driver settings: lossy data compression (compression ratio of 10, 24 bits per pixel, decompression level of 7, tile size of 1430x2012)
- compressed file = 188,110 bytes (183.7KB)
BlockMap_LeadQF10aDL7t1430x2012.jp2
file compressed in Photoshop using LEAD Technologies JP2 plug-in
driver settings: lossy data compression (quality factor of 10, 24 bits per pixel, decompression level of 7, tile size of 1430x2012)
- compressed file = 705,320 bytes (688.8KB)
BlockMap_XnVq80.jp2
file compressed in XnView using its standard JPEG-2000 JP2 driver
driver settings: quality of 80
- compressed file = 862,946 bytes (842.7KB)
BlockMap_XnV1to10.jp2
file compressed in XnView using its standard JPEG-2000 JP2 driver
driver settings: compression rate of 1 to 10
- compressed file = 863,148 bytes (842.9KB)
BlockMap_XnVLura1to10.jp2
file compressed in XnView using its LuraWave JPEG-2000 JP2 driver
driver settings: compression rate of 1 to 10
- compressed file = 863,236 bytes (843.0KB)
BlockMap_LeadQF10.jp2
file compressed in Photoshop using LEAD Technologies JP2 plug-in
driver settings: lossy data compression (quality factor of 10, 24 bits per pixel, NO advanced options)
- compressed file = 863,236 bytes (843.0KB)
BlockMap_LeadCR10.jp2
file compressed in Photoshop using LEAD Technologies JP2 plug-in
driver settings: lossy data compression (compression ratio of 10, 24 bits per pixel, NO advanced options)
- compressed file = 4,533,021 bytes (4.32MB)
BlockMap_XnVLOSSLESS.jp2
file compressed in XnView using its standard JPEG-2000 JP2 driver
driver settings: lossless compression
- compressed file = 4,549,852 bytes (4.34MB)
BlockMap_XnVLuraLOSSLESS.jp2
file compressed in XnView using its LuraWave JPEG-2000 JP2 driver
driver settings: lossless compression
- compressed file = 4,564,523 bytes (4.35MB)
BlockMap_LeadLOSSLESS.jp2
file compressed in Photoshop using LEAD Technologies JP2 plug-in
driver settings: lossless data compression (24 bits per pixel)
JPEG-2000 compression: J2K file format
This is an alternative file format to JP2, and may render better in some browsers.
A NOTE ON SETTINGS FOR:
Lead J2K driver for Photoshop (plug-in)
· text starts degrading above a compression ratio of 40 (although even at a ratio of 70, image text is still readable)
PREFERRED = setting of 10
· text starts degrading above a quality factor of 20
PREFERRED = setting of 10
· 24-bit setting (bits per pixel option) produces better compression with a true color image (default is 24-bit)
PREFERRED = 24 bits per pixel
· best file compression achieved with highest settings for decompression level (range is from 1 to 7, with default of 5)
PREFERRED = setting of 7
· best file compression achieved with larger tile sizes (default is 640x480)
PREFERRED = 1430x2012 (same as image size)
· progressing order option does not affect compression file size, but only how an image loads and decompresses (default is quality-axis order, where image starts out blurry and becomes clearer and more detailed as additional data is decoded)
PREFERRED = quality-axis order (default)
RESULTING TEST FILES:
- compressed file = 187,981 bytes (183.6KB)
BlockMap_LeadCR10aDL7t1430x2012.j2k
file compressed in Photoshop using LEAD Technologies J2K plug-in
driver settings: lossy data compression (compression ratio of 10, 24 bits per pixel, decompression level of 7, tile size of 1430x2012)
- compressed file = 187,981 bytes (183.6KB)
BlockMap_LeadQF10aDL7t1430x2012.j2k
file compressed in Photoshop using LEAD Technologies J2K plug-in
driver settings: lossy data compression (quality factor of 10, 24 bits per pixel, decompression level of 7, tile size of 1430x2012)
- compressed file = 863,107 bytes (842.9KB)
BlockMap_LeadCR10.j2k
file compressed in Photoshop using LEAD Technologies J2K plug-in
driver settings: lossy data compression (compression ratio of 10, 24 bits per pixel, NO advanced options)
- compressed file = 863,107 bytes (842.9KB)
BlockMap_LeadQF10.j2k
file compressed in Photoshop using LEAD Technologies JP2 plug-in
driver settings: lossy data compression (quality factor of 10, 24 bits per pixel, NO advanced options)
- compressed file = 4,564,394 bytes (4.35MB)
BlockMap_LeadLOSSLESS.j2k
file compressed in Photoshop using LEAD Technologies J2K plug-in
driver settings: lossless data compression (24 bits per pixel)
JPEG compression: JPG file format
A NOTE ON SETTINGS FOR:
Photoshop “Save for Web” JPG driver
· text begins to degrade below medium quality (options are low, medium, high, maximum)
PREFERRED = medium
XnView JPG driver
· text begins to degrade below a quality of 50 (although even at a quality of 30, image text is still readable)
PREFERRED = setting of 60
RESULTING TEST FILES:
- compressed file = 172,974 bytes (168.9KB)
BlockMap_PhotoshopLOW.jpg
file compressed in Photoshop using its “Save for Web” JPEG file format driver
driver settings: defaults for low quality
- compressed file = 201,196 bytes (196.5KB)
BlockMap_XnVq30.jpg
file compressed in XnView using its standard JPG file format driver
driver settings: quality of 30
- compressed file = 300,497 bytes (293.5KB)
BlockMap_PhotoshopMED.jpg
file compressed in Photoshop using its “Save for Web” JPEG file format driver
driver settings: defaults for medium quality
- compressed file = 329,382 bytes (321.7KB)
BlockMap_XnVq60.jpg
file compressed in XnView using its standard JPG file format driver
driver settings: quality of 60
- compressed file = 511,151 bytes (499.2KB)
BlockMap_XnVq80.jpg
file compressed in XnView using its standard JPG file format driver
driver settings: quality of 80
GIF compression: GIF file format
A NOTE ON SETTINGS FOR:
Photoshop “Save for Web” GIF driver
· color degrades markedly with automatic selection of 32 colors and below, while text degrades with automatic selection of 16 colors and below (options are: 8 colors, 16 colors, 32 colors, 64 colors, 128 colors, 256 colors)
PREFERRED = 64 colors
XnView GIF driver
· color degrades markedly below automatic selection of 64 colors, while text degrades below automatic selection of 32 colors (options are: 8 colors, 16 colors, 32 colors, 64 colors, 128 colors, 256 colors)
PREFERRED = 64 colors
RESULTING TEST FILES:
- compressed file = 740,043 bytes (722.7KB)
BlockMap_XnV032CLR.gif
file compressed in XnView using its standard GIF file format driver
driver settings: 32 colors, no dithering
- compressed file = 990,280 bytes (967.1KB)
BlockMap_XnV064CLR.gif
file compressed in XnView using its standard GIF file format driver
driver settings: 64 colors, no dithering
- compressed file = 1,062,922 bytes (1.01MB)
BlockMap_Photoshop032CLR.gif
file compressed in Photoshop using its “Save for Web” GIF file format driver
driver settings: 32 (automatically selected) colors
- compressed file = 1,304,662 bytes (1.24MB)
BlockMap_Photoshop064CLR.gif
file compressed in Photoshop using its “Save for Web” GIF file format driver
driver settings: 64 (automatically selected) colors
PNG compression: PNG file format
A NOTE ON SETTINGS FOR:
Photoshop PNG driver (one output only; no options for setting compression levels)
XnView PNG driver
· compression levels range from 19, with little noticeable variation in image quality
PREFERRED = 9
RESULTING TEST FILES:
- compressed file = 5,079,998 bytes (4.84MB)
BlockMap_XnVc9.png
file compressed in XnView using its standard PNG file format driver
driver settings: compression level of 9
- compressed file = 5,525,837 bytes (5.27MB)
BlockMap_Photoshop.png
file compressed in Photoshop using its PNG file format driver
driver settings: default
- compressed file = 5,619,209 bytes (5.36MB)
BlockMap_XnVc1.png
file compressed in XnView using its standard PNG file format driver
driver settings: compression level of 1
|
|
|