Posts Tagged ‘JPEG’

Which bitmap format to choose

Hi folks,

Following the short suite of articles that briefly described the most popular raster graphics file formats, today we will try to make a synthesis and see which format would be a best choice for which purpose.

Image capturing
When capturing images, either by scanning a document or taking a photo, the best idea would probably be to get the highest quality possible and keep the full amount of details.
The initial capture file is a “master” file so, unless you can repeat the same capture process anytime or don’t care about long term preservation, you can store it somewhere safe and convert it to other formats for current manipulation.
And if you think that such practice is for professionals only, you’d better think again.
IT evolves at highest speed: image acquiring quality is increasing, bandwidths are getting larger and cheaper, storage spaces too and image quality standards are adapting accordingly so what was considered a professional level of quality few years ago, today is widely common.
So you shouldn’t be afraid to use TIFF format as best choice for richest captures.
But there’s always PNG at disposal too of course.

Image handling
Chosing a format for image handling depends mainly on the kind of image involved but also on its manipulation purpose.
For example, JPEG is notoriously the best choice for photos offering an optimum quality vs. size ratio, we’ve explained you previously how this was achieved.
JPEG can be used especially for smooth-toned images but due to its small sizes, even if quality-lossy, it can be used for any kind of images including documents.
Actually, when it comes to documents to be shared at real minimal size with least acceptable quality, there is JBIG2.
Making a visual comparison between a JPEG and a JBIG2 format version of a same document might seem to turn JPEG into a winner.
But for large amounts of documents or for transfering documents through busy networks, JBIG2 is a life-saviour.
In case the quality of the document is really important, PNG should do the trick.
For web graphics, GIF and PNG are largely prefered.
They both are palette-based and the file-sizes depend on bit depth and on the number of colors of the palette, one basic difference being that GIF allows animations while PNG supports gradual transparency.
So they both are well-suited for webdesign items like logos, buttons, banners and so forth, the choice depending on graphic artist’s intentions.
For short animations (today used mostly for tutorial/explanatory purposes) GIF is the only choice, similar to how PNG is the only choice for graphics where variable transparency is required.
As you’ve probably noticed, we’ve mentioned PNG several times above as it can be used for full-colour images with lossless compression, continuous-tone full-colour images at the highest quality (not highest compression), B/W and greyscale images, for desktop and web purposes, thus making PNG a reliable and versatile quick choice solution when there is no real pressure for a certain requirement.

Image printing
Normal printers are designed to work fairly well with all kind of image file formats.
But if printing quality is a serious requirement (talking about desktop printing quality level, not highly professional level) then the “give me most possible data from uncompressed source and I’ll give you best possible result” principle applies.
In other words: use TIFF.
Which is yet another reason for you to consider the initial recommendation above of keeping “master” files.

Well, the circle being closed now, let’s just add that we’ve tried to keep everything as basic as possible.
There are many aspects and details we’ve intentionally skipped because the scope of our blog articles is simplicity.
But if complexity is what you need, please feel free to use GdPicture.NET SDK to build applications controling every possible detail of images in more than 90 supported file formats.
And if you’re not into software development, have no worries: we’ve already built such application for you.
It is called PaperScan and it can be downloaded from here.

See you next week, folks!

Bogdan

Big Browser on August 23

Some iRumours Read article Average Income per Programming Language Read article The Story of the PING Program Read article Meet the NASA scientist devising a starship warp drive Read article Google can't have dotless domains, rules ICANN regulator Read article

Briefly about JPEG

Hi folks,

We are going to dedicate an article to each of the most popular bitmap file formats and today we will make a quick incursion through JPEG.

JPEG (.jpg or .jpeg) is a bitmap image file format specifically developed for storing photographic images (its name standing for “Joint Photographic Expert Group”).
It has indeed become a standard format for photos in digital cameras and also for displaying images on internet web pages, as we all know.
But on the other hand, another well-known fact is that JPEG uses lossy compression.
So how can its general adoption be explained in photographic field, where losing information is not desirable?

The answer resides in the smart solution the creators of this format found to compromise between image quality and file size.
Compression techniques used in JPEG are oriented towards retaining details which have bigger impact on the human eye and discarding those who have less visual impact and it is based on the fact that human eyes are less receptive to slight differences in color than they are to slight differences in brightness (light/dark).
Moreover, JPEG format is highly flexible, providing compression options (among other), whose settings can be changed to fit the needs of each image, so any image creator can negociate file size against output image quality at his own will.

JPEG compresses full-colour (24 bit) as well as grey-scale digital images.
Following the primary target for which it has been created for, JPEG works very well on photos for the purpose of sharing.
Typically a 10:1 compression rate produces little perceptible losses in image quality.
Therefore, the initial RAW format of a digital camera photo is converted to much smaller sized JPEG and the differences will not be bothering for the average human eye.
It is important to note, however, that JPEG compression introduces loss artifacts even if the output quality option is set to its maximum value by the user.
Another important thing to know is that each succesive JPEG file’s opening-for-editing then saving introduces additional image quality degradation (of course, JPEG opening-for-viewing doesn’t affect image’s quality).
So users who need one or several image editing sessions until reaching a final version should work with lossless formats, such as TIFF or PNG instead of JPEG.
Actually, JPEG does provide support for lossless compression, too (developed later, as an extension to the “classic” JPEG) but this addition never gained popularity.

JPEG2000 (.jp2, .j2k) is another standard created by the Joint Photographic Experts Group (in the year 2000), meant to improve the 1992, “regular” JPEG performances and offer some new capabilities that were missing in JPEG.
It provides both lossless and lossy compressions, better image quality at smaller filesizes than JPG, 48-bit color depth support, decoding with different output resolutions, possibility of dividing an image into smaller parts to be coded independently, it allows transparency and the list goes on.
Being quite complex, JPEG2000 implementation took time to spread out but it is already present in the mainstream now and some say it is a serious competitor to the good old TIFF format, given the 48-bit color support, the much better lossless compression algorithm and the possibility of using a single format flexible enough to satisfy both archiving needs (lossless master files) and sharing/access requirements (lossy but much smaller versions of the master files).

Let’s not finish without saying a word about Progressive JPEG, too: this is a special kind of JPEG sub-format meant to better serve web-users for larger files and/or slower internet connections.
The web-optimization consists in allowing users to start viewing the image in browser while it is still downloading and view it at full quality when download is complete (instead of viewing it only after the complete download of the file).
The basic principle which led to creating this format is that, from an user’s point of view, appearing faster equals to being faster so speed-as-perceived-by-user is more important than the real speed.
Actually, the same principle led to the creation of another filetype sub-format, the Linearized PDF, a subject we will detail in a separate article, soon.
Latest versions of the most important browsers supports Progressive JPEG but the format is not credited with widespread, at least not yet.
However, mobile devices might prove decisive for the future of Progressive JPEG, given its responsiveness.

If you want to juggle with RAW, JPEG, Progressive JPEG and JPEG2000, alongside with many other bitmap and PDF formats, use PaperScan: it has all you need and much more!

See you next week!

Bogdan

Big Browser on May 24

Ethernet turns 40 years old today Read article The Microsoft Transition and How It Will Affect You Read article Xbox One runs three operating systems, including cut-down Windows for apps Read article Making Linux and Android Get Along (It's Not as Hard as It Sounds) Read article 45 Ways to Communicate Two Quantities Read article