Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
JPEG
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==JPEG compression== JPEG uses a lossy form of compression based on the [[Discrete cosine transform|discrete cosine transform (DCT)]]. This mathematical operation converts each frame/field of the video source from the spatial (2D) domain into the frequency domain (a.k.a. transform domain). A perceptual model based loosely on how the human psychovisual system discards high-frequency information, i.e. sharp transitions in intensity, and color hue. In the transform domain, the process of reducing information is called quantization. In simpler terms, quantization is a method for optimally reducing a large number scale (with different occurrences of each number) into a smaller one, and the transform-domain is a convenient representation of the image because the high-frequency coefficients, which contribute less to the overall picture than other coefficients, are characteristically small-values with high compressibility. The quantized coefficients are then sequenced and losslessly packed into the output bitstream. Nearly all software implementations of JPEG permit user control over the compression ratio (as well as other optional parameters), allowing the user to trade off picture-quality for smaller file size. In embedded applications (such as miniDV, which uses a similar DCT-compression scheme), the parameters are pre-selected and fixed for the application. The compression method is usually [[Lossy compression|lossy]], meaning that some original image information is lost and cannot be restored, possibly affecting image quality. There is an optional [[Lossless JPEG|lossless]] mode defined in the JPEG standard. However, this mode is not widely supported in products. There is also an [[interlace (bitmaps)|interlaced]] ''progressive'' JPEG format, in which data is compressed in multiple passes of progressively higher detail. This is ideal for large images that will be displayed while downloading over a slow connection, allowing a reasonable preview after receiving only a portion of the data. However, support for progressive JPEGs is not universal. When progressive JPEGs are received by programs that do not support them (such as versions of [[Internet Explorer for Mac|Internet Explorer]] before [[Windows 7]])<ref>{{cite web | url = http://msdn.microsoft.com/en-us/library/ee720036(v=vs.85).aspx | title = Progressive Decoding Overview | access-date = 2012-03-23 | work = Microsoft Developer Network | publisher = Microsoft | archive-date = 2012-11-19 | archive-url = https://web.archive.org/web/20121119054723/http://msdn.microsoft.com/en-us/library/ee720036(v=vs.85).aspx | url-status = live }}</ref> the software displays the image only after it has been completely downloaded. There are also many medical imaging, traffic and camera applications that create and process 12-bit JPEG images both grayscale and color. 12-bit JPEG format is included in an Extended part of the JPEG specification. The libjpeg codec supports 12-bit JPEG and there even exists a high-performance version.<ref>{{Cite web | last = Fastvideo | title = 12-bit JPEG encoder on GPU | date = May 2019 | url = https://www.fastcompression.com/products/12-bit-jpeg-codec.htm | access-date = 2019-05-06 | archive-date = 2019-05-06 | archive-url = https://web.archive.org/web/20190506142226/https://www.fastcompression.com/products/12-bit-jpeg-codec.htm | url-status = live }}</ref> ===Lossless editing=== Several alterations to a JPEG image can be performed losslessly (that is, without recompression and the associated quality loss) as long as the image size is a multiple of 1 MCU block (Minimum Coded Unit) (usually 16 pixels in both directions, for 4:2:0 [[chroma subsampling]]). Utilities that implement this include: * [[jpegtran]] and its GUI, Jpegcrop. * [[IrfanView]] using "JPG Lossless Crop (PlugIn)" and "JPG Lossless Rotation (PlugIn)", which require installing the JPG_TRANSFORM plugin. * [[FastStone Image Viewer]] using "Lossless Crop to File" and "JPEG Lossless Rotate". * [[XnViewMP]] using "JPEG lossless transformations". * [[ACDSee]] supports lossless rotation (but not lossless cropping) with its "Force lossless JPEG operations" option. Blocks can be rotated in 90-degree increments, flipped in the horizontal, vertical and diagonal axes and moved about in the image. Not all blocks from the original image need to be used in the modified one. The top and left edge of a JPEG image must lie on an 8 Γ 8 pixel block boundary (or 16 Γ 16 pixel for larger MCU sizes), but the bottom and right edge need not do so. This limits the possible '''lossless crop''' operations, and prevents flips and rotations of an image whose bottom or right edge does not lie on a block boundary for all channels (because the edge would end up on top or left, where β as aforementioned β a block boundary is obligatory). Rotations where the image is not a multiple of 8 or 16, which value depends upon the chroma subsampling, are not lossless. Rotating such an image causes the blocks to be recomputed which results in loss of quality.<ref>{{cite web|url=http://petapixel.com/2012/08/14/why-you-should-always-rotate-original-jpeg-photos-losslessly/|title=Why You Should Always Rotate Original JPEG Photos Losslessly|date=14 August 2012|website=Petapixel.com|access-date=16 October 2017|archive-date=17 October 2017|archive-url=https://web.archive.org/web/20171017093502/https://petapixel.com/2012/08/14/why-you-should-always-rotate-original-jpeg-photos-losslessly/|url-status=live}}</ref> When using lossless cropping, if the bottom or right side of the crop region is not on a block boundary, then the rest of the data from the partially used blocks will still be present in the cropped file and can be recovered. It is also possible to transform between baseline and progressive formats without any loss of quality, since the only difference is the order in which the coefficients are placed in the file. Furthermore, several JPEG images can be losslessly joined, as long as they were saved with the same quality and the edges coincide with block boundaries.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
JPEG
(section)
Add topic