<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged jpeg</title>
<link>https://coderlegion.com/tag/jpeg</link>
<description>Powered by Question2Answer</description>
<item>
<title>Why JPEG can blur colored text even at a high quality setting</title>
<link>https://coderlegion.com/31603/why-jpeg-can-blur-colored-text-even-at-a-high-quality-setting</link>
<description>&lt;p&gt;A JPEG export can leave a soft fringe around colored text even when the image keeps its original dimensions. Before pushing the quality slider higher, check whether the encoder is reducing the resolution of the color channels. That process is called chroma subsampling.&lt;/p&gt;
&lt;p&gt;Consider a small red label beside a gray button. Its edge has an abrupt color change. A cloudy sky usually has gentler transitions, so settings that suit that photograph may leave the label looking smeared.&lt;/p&gt;
&lt;h3 id=&quot;color-has-its-own-resolution&quot;&gt;Color has its own resolution&lt;/h3&gt;
&lt;p&gt;A common JPEG encoding path converts RGB into YCbCr. Y carries luma, a brightness-related signal; Cb and Cr carry color-difference information. Chroma subsampling reduces the spatial resolution of those color components. The decoded picture still has the same pixel dimensions.&lt;/p&gt;
&lt;p&gt;With 4:4:4, each color-difference component has a sample at every pixel position. With 4:2:2, each has half the horizontal resolution. With 4:2:0, each has half the horizontal and half the vertical resolution. For a conceptual 4-by-4 patch, that means 16 samples per chroma component at 4:4:4, compared with four at 4:2:0. These are sample counts, not predictions of compressed file size. The &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/libjpeg-turbo/libjpeg-turbo/blob/main/src/turbojpeg.h&quot;&gt;TurboJPEG API documentation&lt;/a&gt; describes these sampling arrangements.&lt;/p&gt;
&lt;p&gt;When decoding a subsampled image, the decoder reconstructs color samples for the full output grid. A narrow colored stroke can acquire a softer edge in that reconstruction. Inspect the small labels directly: fitting the whole screenshot into a preview can conceal the damage.&lt;/p&gt;
&lt;h3 id=&quot;quality-and-subsampling-are-different-controls&quot;&gt;Quality and subsampling are different controls&lt;/h3&gt;
&lt;p&gt;In libjpeg-turbo's lossy JPEG encoder, the quality setting scales the quantization tables. Subsampling has its own control. Its &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/libjpeg-turbo/libjpeg-turbo/blob/main/doc/usage.txt&quot;&gt;command-line documentation&lt;/a&gt; explains that quality 100 still allows losses from subsampling and rounding. A high quality value does not, by itself, establish that full chroma resolution was retained.&lt;/p&gt;
&lt;p&gt;An application may tie its quality slider to several encoder settings. Check the exporter you are using; the number 90 alone tells you too little to reproduce its output in another application.&lt;/p&gt;
&lt;h3 id=&quot;compare-exports-from-the-same-source&quot;&gt;Compare exports from the same source&lt;/h3&gt;
&lt;p&gt;Start with a screenshot containing small colored text. From that source, export two JPEG copies at identical dimensions and quality settings. Use 4:2:0 for one and 4:4:4 for the other if the encoder lets you choose. Put those settings in the filenames and keep a note of the encoder version. Someone checking your result should be able to recreate the exports.&lt;/p&gt;
&lt;p&gt;View the copies at a consistent image zoom, including 100%, then inspect an enlarged crop of the label. Keep any resizing out of this first comparison. Otherwise, a resizing filter adds another explanation for a soft edge. Compare the downloaded files, because a preview in an export dialog may be scaled differently.&lt;/p&gt;
&lt;p&gt;Treat this as an experiment to run on your own images. No benchmark measurements are reported here. If the two copies look alike, record that observation and investigate the other processing steps before attributing the problem to subsampling.&lt;/p&gt;
&lt;p&gt;I work on &lt;a rel=&quot;nofollow&quot; href=&quot;https://morphio.online/&quot;&gt;Morphio&lt;/a&gt;, which offers HEIC conversion tools. When deciding on an output format, I would include small colored labels in the visual checks if they are part of the image. The encoder controls described above are not a statement about which settings Morphio exposes.&lt;/p&gt;
&lt;h3 id=&quot;choose-a-format-for-the-content&quot;&gt;Choose a format for the content&lt;/h3&gt;
&lt;p&gt;For screenshots with text or diagrams, include PNG in the comparison. PNG compresses losslessly, so it can preserve the raster samples supplied to its encoder. It cannot restore details already lost in a previous JPEG export. MDN's &lt;a rel=&quot;nofollow&quot; href=&quot;https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Formats/Image_types&quot;&gt;image format guide&lt;/a&gt; discusses PNG and JPEG in this context.&lt;/p&gt;
&lt;p&gt;If the destination requires JPEG, compare a 4:4:4 export with the subsampled copy. Other lossy encoding steps still affect both. Then inspect the image served by the destination page: an upload service may resize or recompress your file after you send it.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/31603/why-jpeg-can-blur-colored-text-even-at-a-high-quality-setting</guid>
<pubDate>Sun, 18 Oct 2026 11:12:46 +0000</pubDate>
</item>
</channel>
</rss>