{"id":1521,"date":"2017-02-17T18:48:50","date_gmt":"2017-02-17T18:48:50","guid":{"rendered":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/?p=1521"},"modified":"2017-02-17T18:54:32","modified_gmt":"2017-02-17T18:54:32","slug":"n5-graphic-formats-revision","status":"publish","type":"post","link":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/2017\/02\/17\/n5-graphic-formats-revision\/","title":{"rendered":"N5 &#8211; Graphic Formats (Revision)"},"content":{"rendered":"<h3>Graphic Formats<\/h3>\n<p><strong>JPEG<\/strong> (.jpg) Lossy compression<\/p>\n<ul>\n<li>24 bit colour.<\/li>\n<li>Allows the user to select an appropriate level of compression.<\/li>\n<li>JPEG is a good compression format for high-quality images and images where quality is unimportant (e.g. thumbnails).<\/li>\n<\/ul>\n<p><strong>PNG<\/strong> (.png) Lossless compression<\/p>\n<ul>\n<li>Intended to improve upon GIF format.<\/li>\n<li>24 bit colour.<\/li>\n<li>Allows user to set alpha level for improved transparency.<\/li>\n<\/ul>\n<p><strong>GIF<\/strong> (.gif) Lossless compression \u2022 Restricted to 8 bit colour.<\/p>\n<ul>\n<li>Several images can be stored in one GIF file, allowing for animation.<\/li>\n<li>Allows a specific colour in an image to be made transparent.<\/li>\n<li>GIF is a good compression format for images with areas of flat colour, images that have few colours, animated images or images that require transparency.<\/li>\n<\/ul>\n<p><strong>Graphic file size calculations<\/strong><\/p>\n<p>To calculate the file size (in bits) of a bitmap graphic file the basic formula is:<\/p>\n<p><em>number of pixels in image x bit depth<\/em><\/p>\n<ul>\n<li><strong>Bit depth<\/strong> or colour depth is the number of bits that were used to store the colour of each pixel.\n<ul>\n<li>8 bit &#8211; 256 colours<\/li>\n<li>16 bit &#8211;\u00a065536 colours (High Colour)<\/li>\n<li>24 bit &#8211;\u00a016777216 colours (True Colour)<\/li>\n<\/ul>\n<\/li>\n<li><strong>DPI (dots per inch)<\/strong> the number of pixels in a physical inch of paper.<\/li>\n<\/ul>\n<p><strong>Example 1<\/strong><br \/>\nCalculate the file size of a 400 x 400 pixel graphic with a colour depth of 24.<\/p>\n<p><em>400 x 400 = 160000 pixels in the image<\/em><br \/>\n<em>160000 x 24 = 3840000 bits<\/em><br \/>\n<em>3840000 \/ 8 = 480000 bytes<\/em><br \/>\n<em>480000 \/ 1024 = 468.75 KB<\/em><\/p>\n<p><strong>Example 2<\/strong><br \/>\nCalculate the file size of a 300 x 200 graphic with 256 colours.<br \/>\n256 colours means a colour depth of 8 (because 2^8 = 256)<\/p>\n<p><em>300 x 200 = 60000 pixels in the image<\/em><br \/>\n<em>60000 x 8 = 480000 bits<\/em><br \/>\n<em>480000 \/ 8 = 60000 bytes<\/em><br \/>\n<em>60000 \/ 1024 = 58.6 KB<\/em><\/p>\n<p><strong>Example 3<\/strong><br \/>\nCalculate the file size of a 6\u2019 x 5\u2019 image, scanned at 200dpi, with 16 bit colour.<\/p>\n<p><em>6 x 5 x 200 x 200 = 1200000 pixels in image<\/em><br \/>\n<em>1200000 x 16 = 19200000 bits<\/em><br \/>\n<em>19200000 \/ 8 = 2400000 bytes<\/em><br \/>\n<em>2400000 \/ 1024 = 2343.75 KB<\/em><br \/>\n<em>2343.75 \/ 1024 = 2.3 MB<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Graphic Formats JPEG (.jpg) Lossy compression 24 bit colour. Allows the user to select an appropriate level of compression. JPEG is a good compression format for high-quality images and images where quality is unimportant (e.g. thumbnails). PNG (.png) Lossless compression Intended to improve upon GIF format. 24 bit colour. Allows user to set alpha level &hellip;<\/p>\n","protected":false},"author":32,"featured_media":1385,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17008,17007,17013],"tags":[],"class_list":["post-1521","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-graphics-media-types","category-media-types","category-national-5"],"jetpack_featured_media_url":"https:\/\/blogs.glowscotland.org.uk\/nl\/public\/ColtnessHS-ComputingScience\/uploads\/sites\/12638\/2016\/09\/Slide3.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/posts\/1521","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/users\/32"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/comments?post=1521"}],"version-history":[{"count":3,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/posts\/1521\/revisions"}],"predecessor-version":[{"id":1524,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/posts\/1521\/revisions\/1524"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/media\/1385"}],"wp:attachment":[{"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/media?parent=1521"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/categories?post=1521"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/tags?post=1521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}