Journal of Mathematics Research; Vol. 9, No. 4; August 2017 ISSN 1916-9795 E-ISSN 1916-9809 Published by Canadian Center of Science and Education 114 Analysis of Compression Ratio of Various Randomly Generated Images of Same Size Tanvir Prince 1 1 Associate Professor of Mathematics, Hostos Community College, City University of New York, USA Correspondence: Tanvir Prince, Associate Professor of Mathematics, Hostos Community College, City University of New York. USA. E-mail: tprince@hostos.cuny.edu Received: June 28, 2017 Accepted: July 13, 2017 Online Published: July 19, 2017 doi:10.5539/jmr.v9n4p114 URL: https://doi.org/10.5539/jmr.v9n4p114 Abstract Various randomly generated images of size × are created and compressed using the standard TIF compression and their compression ratio are analyzed. TIF compression is used to preserve the original file size. This method is applied for various values of and . The study of randomized picture in the literature is very rare and this current paper is aimed to fill up that gap. Keyword: randomly generated picture; compression ratio; JPEG; random image 1. Introduction In mathematics, we have studied random path, randomly generated graphs, random matrix etc. But the study of randomly generated images is very rare. The purpose of this paper is to fill this big gap in the literature. We have created random pictures of various sizes of up to 10,000 pixels. Each fixed size is analyzed in two different ways. So for a given image of size, ×, we consider two sizes × and × so that,  =  = . In each case, 100 random pictures are generated and saved as “.tif” format to preserve original size. We gradually increase  from 12 to all the way to 10,000 and analyze the file size. We use “Mathematica” software to generate the random image. To learn more about Mathematica, readers are encouraged to see (Purdue University, n.d.) and (Wolfram Mathematica, 2013). All the code is provided in this paper so that the reader can recreate the experiment using a computer. 2. Various Other Use of Image Compression Image compression is an everyday application. When you post an image in the Facebook, or download/upload an image from/to the internet, it automatically goes through an image compression mechanism, most likely, JPEG compression (Group, n.d.), as this being the most standard means of compression. To learn the mathematics behind the JPEG compression see (Image Compression, 2011). Image compression is used in NASA (Center). To learn some specific examples of image compression in NASA, see (Prince, Franco, Salva, & Windolf, 2014). To learn some modeling with image pixel see (Oyvind, 2007). To learn some other types of image compression, like wavelets image compression, see (Center) and for SVD image compression see (Cooper & Lorenc, 2006). 3. Mathematica Code We use the following code to create 100 random images of size ×. T = Table[Image[RandomReal[{0,1}, {, , 3}]], {, 1,100}]; In the above code, you need to replace the and by the appropriate number. Then use the following code to export all the images to a folder: P = Export["C:\\Users\prince\\Google Drive\\Portfolio_after_promotion\\publication_after_promotion\ \Analyse Compression Ratio of Various Randomly Generated Images of Same Size\ \compare_area_of_12\\4_by_3\\image001. tif", T, "VideoFrames"]; Here everything in red is the “folder path” where you want your images to be saved. The green part tells “Mathematica” to export the images one after the other. Note the .tif extension at the end which means that we are using “TIF” compression. If you want use “PNG” or “JPEG” instead, then use .png and .jpg respectively.