4. An application software converts an image in PNM format image into PGX format
ID: 3282811 • Letter: 4
Question
4. An application software converts an image in PNM format image into PGX format. Relevant information from gprof profiler when the application software is executed is provided in the first three columns of the table below. The total conversion time for the application software took 200 msecs. Columns 4 to 5 provide information on hardware implementation of the individual functions. Number of Calls Name of the function, i Hardware Execution time h(i) us Marshalling time m(1) us % time 8.82 11.76 8.82 20.59 17.65 7.65 14.71 6291456 6291456 2048 2048 6291456 inttobits bitstoint as image writecmpt 0.001 50 as inage readcim nm getuint nm decode x encode 1000 1000 0.01 20 20 Jas image_decode main Which of the functions would you consider for hardware implementation based on the information given above in order of priority with appropriate calculations and explain clearly why you selected them?Explanation / Answer
PNGs are not restricted to the 256 color limitation of GIF files and have better compression.
Advantages of .png:
The PNG format (pronounced "PING") was designed to replace the antiquated GIF format, and to some extent, the TIFF format.
It utilizes lossless compression, meaning no image data is lost when saving or viewing the image.
It is a universal format that is recognized by the World Wide Web consortium, and supported by modern web browsers.
The PNG format was developed when it was discovered by the entire development community in early 1995 that the GIF image format uses LZW compression,
technology which was patented in 1985 by Unisys corporation.
The initial developers of the GIF format, Compuserve, was not aware of this at the time of it's development in 1987.
The PNG format does not have any patent restrictions and can be read and written freely by software developers and webmasters alike.
Advantages of .jif:
GIF images can only be saved as an 8-bit colormapped image, which means you are limited to 256 colors.
Remember the GIF format was developed back when most PC's only had the capability of 256 colors.
PNG can be saved not only as 8 bit, but also 24 bit and higher up to 64 bit! GIF images allow one out of the possible 256 colors to be fully transparent.
As we discuss below, PNG has a much higher level of transparency support.
Another benefit of PNG over GIF is typically the filesize of a PNG is about 20% smaller then the same GIF image. Finally, as discussed in the PNG overview above,
GIF has patent restrictions with it's use.
Advantages of .jpeg:
Unlike PNG, JPEG uses a lossy compression routine.
Lossy compression means that the image loses quality and information each time it is saved.
Because JPEG uses lossy compression, the filesize is almost always smaller then a PNG, especially for photographic images.
Care must be taken when working with JPEG images as each time a JPEG is re-saved, more and more compression artifacts are introduced.
Since PNG uses lossless compression it's an ideal format ideal for archival purposes, and for editing before saving a final version as a JPEG.
JPEG is the most common image format used on the web, and will continue to be.
Most photographic images should be saved as JPEG as opposed to PNG for viewing on the web as the filesize will be much smaller.
Advantages of .tiff:
The TIFF image format has been around for a long time, and will likely be around for quite a while more.
The TIFF format was the cross-platform image format by choice until PNG was introduced, and according to some still is.
TIFF's are a developer's nightmare.
One of the more popular TIFF's is the 24-bit LZW compressed version.
This has the same patent restrictions as the GIF format does, but until PNG, was the only standard lossless compressed format.
The standard 24 Bit PNG functionally is very similar in function to a LZW compressed TIFF. The TIFF format is able to store multiple images in one file.
This is commonly used for FAX images. PNG's do not have this capability.
The TIFF format remains to be popular, but there are few reasons to use it for photograph archival with the added benefits of PNG.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.