Mixture of Red, Green, Blue color occupies more space as compared to two and three color combinations

Mixture of Red, Green, Blue color occupies more space as compared to two and three color combinations

Author: Fazal Rehman (Shamil)

University Of Shamil, Pakistan

fazalrehmanshamil@gmail.com

Abstract

To increase the image optimization rate is a big problem especially for web-based application and big data. There are many guidelines and techniques to optimize the image. But still, there is a need to increase the image optimization rate. Among image optimization techniques most common is image cropping, optimization of image dimensions, deletion of irrelevant image layers and headers and save the image as “save for web”. Save the image for the web is mostly used by web designers. Among these techniques, we have proposed the image optimization technique by selecting the appropriate optimized colors. We use the Microsoft windows paint and compare the different images with different colors. We conclude that color is a prominent factor that affects the image size. Some colors are found to have very much size as compared to other colors. We also find that some colors having a difference of 24%. Most of the colors have 3% to 8% difference with each other. This appropriate color selection boosts the image optimization rate of an image.

  1. INTRODUCTION

Now in the era of big data and web, it is a problem to optimize the images with extreme limit without reducing the quality of the image. When images are not optimized they create the problem to store, upload, download and to share the images.

There are different image optimization techniques to reduce the image size. Some of these techniques optimize the image and also reduce the quality of images. However, some techniques optimize the images without losing the quality of the image. It is always an interest of the web designers to decrease the size of an image more and more. The optimized image has many advantages over the non-optimized image [6]. Some of the advantages are;

  • Fast uploading
  • Fast downloading
  • Fast response
  • Efficient SEO
  • Less bandwidth usage etc.

Image optimization techniques work better and our proposed guidelines support to decrease the size of an image before optimizing an image.

We proposed guidelines to select colors according to their size. We have introduced in our research that colors effects on image size. If someone chose the color according to our guidelines, then optimized images are produced. We use the Microsoft windows paint and select colors one by one and save the images. After the image creation, we evaluate the images size. During experiments, we have found a different hidden pattern in colors.  During the experiments with PNG images, all colors are observed to have different size. The red color is observed to have more size as compared to Green and Green observed to have more size as compared to Blue. Red with Green occupies more space as compared to Red with Blue. Green with Red occupies more space as compared to Green with Blue.

Blue with Red occupied more space as compared to Blue with Green.

  1. Literature Review:

There are many image optimization techniques. Some of the image optimization techniques are mentioned in this section.

2.1 Selection of image type:           

Image type is most common to optimize the images. Selection of correct image type is always helpful in process of image optimization. There are many image types like JPG, PNG, GIF and TIFF etc. PNG (Portable Network Graphic) is used when it is a need to support the lossless data optimization. PNG is mostly preferred for website images. When there are many logos, icons and text in the images, PNG is an ideal choice. PNG is very useful for images with transparent backgrounds. JPG (Joint Photographic Experts Group) is mostly used when there is a big demand of high quality images [1].

2.2 Vector graphic images:

Vector graphics images are formed by geometrical shapes like curves, points and lines etc. These images have programming source code and code can be optimized easily. Vectored images are easily modifiable. Size of vectored images can be optimized easily because shapes are drawn with source code [2].

2.3 Crop the image:

Image cropping is a very famous technique of image optimization. We crop the image and remove the irrelevant background and objects from the image. This leads to forming an image with low size [2].

2.4 Dimensions of image:

A dimension of an image is represented by X and Y axis. Axis of the image plays a key role in the size of an image. As we increase the X or Y axis of an image, then its size is also increased. Similarly to optimize the image, we decrease the X and Y axis [3-5].

2.5 Deleting irrelevant layers:

An image is formed of different layers. Sometimes some unnecessary layers are in the image. These unnecessary layers are removed to optimize the image [4].

2.6 Save for web:

Mostly all the image editing tools have an option to save the image as “save for web”. This is an option to save the images with optimized size. This technique is ideal for image optimization for web designers [3].

2.7 Optimization of headers:

All JPG images have an optional exchangeable image format header. This header contains different information about an image. Copyright of the image, author of the image, time of image capturing, camera specification and some other metadata of image is stored in the header of the image. Most of the time designers remove the header from images to optimize the image because header does not affect the display.

2.8 Progressive encoding:

With the default baseline encoding, a web browser renders a JPG image completely. It starts rendering the image from the top to the bottom as and when image downloads. Progressive encoding optimizes the JPG images to 10 KB. An important advantage of this technique is that users can view rendered images faster [8].

2.9 Transparent Background:

Most of the brand logos are with transparent backgrounds. An image with transparent background has less number of pixels. Transparent background is an ideal for image optimization [7].

  1. METHODOLOGY:

During the experiments, we open the Microsoft windows paint and set the dimensions of an image. The dimension of the image is taken by both keeping the aspect ratio and without keeping the aspect ratio. We start with X and Y axis as 1 and then we increase the axis by 2*2 and then 500*500, 1000 *1000 and 500 * 1000. We create the different images by selecting the different hue, saturation, and luminance of the color. After that, we save the image and evaluate the size of the image with other images having different colors.

  1. DATA SET AND EXPERIMENTS

There are thousands of color combinations used as data as discussed below [16-18];

Single color:

Red – Total 256 colors

Green – Total 256 colors

Blue – Total  256 colors

Two colors:

Red + Green –  Total 196608 colors

Red + Blu – Total  196608 colors

Blue + Green – Total 196608 colors

Three colors:

Red + Green + Blue – Total 589824 colors

It is very difficult to manage such a large number of colors and images. So we adopt the simple boundary value testing technique to evaluate the colors [20]. We test the colors on their boundaries. Selected boundaries are as following;

Min is the minimum value of color.

Min+ is the one value above the minimum value of color. Nominal is the middle value of color. Max- is the one value below the maximum value of color. Max is the maximum value of color.

    R
1 Min 0
2 Min+ 1
3 Nominal 127
4 Max- 254
5 Max 255

Table 1:  Boundary values for Red color (Single color)

    G
1 Min 0
2 Min+ 1
3 Nominal 127
4 Max- 254
5 Max 255

Table 2:  Boundary values for Green color (Single color)

    B
1 Min 0
2 Min+ 1
3 Nominal 127
4 Max- 254
5 Max 255

 Table 3: Boundary values for Blue color (Single color)

colors effect on image size

Figure 1: Illustration of research methodology

red green blue RGB color values affect the image size

  Size  
  Colour Mixture Dimension

1*1

Dimension

2*2

Dimension

500*500

Dimension

1000*1000

Dimension

500*1000

ID R G B            
1 0 0 0 No Colour 119 118 3402 13216 6675
2 1 0 0 R 119 123 4806 16571 9477
3 127 0 0 R 119 123 4806 16571 9477
4 254 0 0 R 119 123 4806 16571 9477
5 255 0 0 R 119 123 4806 16571 9477
6 0 1 0 G 119 122 4168 15076 8199
7 0 127 0 G 119 122 4168 15076 8199
8 0 254 0 G 119 122 4168 15076 8199
9 0 255 0 G 119 122 4168 15076 8199
10 0 0 1 B 119 122 4167 15074 8197
11 0 0 127 B 119 122 4167 15074 8197
12 0 0 254 B 119 122 4167 15074 8197
13 0 0 255 B 119 122 4167 15074 8197
14 127 127 0 R+G 119 123 4806 16572 9478
16 127 1 0 R+G 119 123 4806 16572 9478
17 127 254 0 R+G 119 123 4806 16572 9478
18 127 255 0 R+G 119 123 4806 16572 9478
20 1 127 0 R+G 119 123 4806 16572 9478
21 254 127 0 R+G 119 123 4806 16572 9478
22 255 127 0 R+G 119 123 4806 16572 9478
24 127 0 1 R+B 119 123 4419 15640 8700
25 127 0 127 R+B 119 123 4419 15640 8700
26 127 0 254 R+B 119 123 4419 15640 8700
27 127 0 255 R+B 119 123 4419 15640 8700
29 1 0 127 R+B 119 123 4419 15640 8700
30 254 0 127 R+B 119 123 4419 15640 8700
31 255 0 127 R+B 119 123 4419 15640 8700
33 0 127 1 G+B 119 122 4169 15077 8200
34 0 127 127 G+B 119 122 4169 15077 8200
35 0 127 254 G+B 119 122 4169 15077 8200
36 0 127 255 G+B 119 122 4169 15077 8200
38 0 1 127 G+B 119 122 4169 15077 8200
39 0 254 127 G+B 119 122 4169 15077 8200
40 0 255 127 G+B 119 122 4169 15077 8200
42 127 127 1 R+G+B 119 123 4419 15640 8701
43 127 127 127 R+G+B 119 123 4419 15640 8701
44 127 127 254 R+G+B 119 123 4419 15640 8701
45 127 127 255 R+G+B 119 123 4419 15640 8701
47 1 127 127 R+G+B 119 123 4419 15640 8701
48 254 127 127 R+G+B 119 123 4419 15640 8701
49 255 127 127 R+G+B 119 123 4419 15640 8701
51 127 1 127 R+G+B 119 123 4419 15640 8701
52 127 254 127 R+G+B 119 123 4419 15640 8701
53 127 255 127 R+G+B 119 123 4419 15640 8701

Table 8: Illustration of images size (Type: PNG) with different dimension

  Size  
  Colour Mixture Dimension

1*1

Dimension

2*2

Dimension

500*500

Dimension

1000*1000

Dimension

500*1000

ID R G B            
1 1 0 0 R 631 631 4723 16503 8691
2 127 0 0 R 634 634 4726 16506 8694
3 254 0 0 R 635 635 4727 16507 8695
4 255 0 0 R 635 635 4727 16507 8695
5 0 1 0 G 631 631 4723 16503 8691
6 0 127 0 G 634 634 4726 16506 8694
7 0 254 0 G 635 635 4727 16507 8695
8 0 255 0 G 635 635 4727 16507 8695
9 0 0 1 B 631 631 4723 16503 8691
1 0 0 127 B 634 634 4726 16506 8694
11 0 0 254 B 635 635 4727 16507 8695
12 0 0 255 B 635 635 4727 16507 8695
13 127 127 0 R+G 635 635 4727 16507 8695
14 127 1 0 R+G 634 634 4726 16506 8695
15 127 254 0 R+G 634 634 4727 16506 8695
16 127 255 0 R+G 635 635 4727 16507 8695
27 1 127 0 R+G 634 634 4726 16506 8695
18 254 127 0 R+G 635 635 4727 16507 8695
19 255 127 0 R+G 635 635 4727 16507 8695
20 127 0 1 R+B 634 634 4726 16506 8694
21 127 0 127 R+B 635 635 4727 16507 8694
22 127 0 254 R+B 635 635 4727 16507 8694
23 127 0 255 R+B 635 635 4727 16507 8694
24 1 0 127 R+B 634 634 4726 16506 8694
25 254 0 127 R+B 634 634 4727 16506 8694
26 255 0 127 R+B 634 634 4727 16506 8694
27 0 127 1 G+B 634 634 4726 16506 8694
28 0 127 127 G+B 634 634 4726 16506 8694
29 0 127 254 G+B 635 635 4727 16507 8694
30 0 127 255 G+B 635 635 4726 16507 8694
31 0 1 127 G+B 634 634 4726 16506 8694
32 0 254 127 G+B 634 634 4726 16506 8694
33 0 255 127 G+B 634 634 4727 16506 8694
34 127 127 1 R+G+B 633 633 4725 16505 8694
35 127 127 127 R+G+B 630 630 4722 16502 8694
36 127 127 254 R+G+B 633 633 4725 16505 8694
37 127 127 255 R+G+B 633 633 4725 16505 8694
38 1 127 127 R+G+B 634 634 4725 16506 8694
39 254 127 127 R+G+B 634 634 4722 16506 8694
40 255 127 127 R+G+B 634 634 4725 16506 8694
41 127 1 127 R+G+B 635 635 4726 16507 8694
42 127 254 127 R+G+B 635 635 4725 16507 8694
43 127 255 127 R+G+B 635 635 4722 16507 8694

Table 9:  Illustration of images size (type: JPG) with different dimension

color size hierarchy, color pixels affect the image size

Figure 2: Level 1 represents an image with large size, size decreases when we move to the bottom.

image size and color pixels RGB Values

0 to 255 RGB values and image size

red green blue occupies less high image size space

one two and three colors and image size

 

one color occupies less space than two colors

RESULTS

During the experiments with single colored (0-255) PNG images, we get the following results as illustrated in Figure 2-7 and in Table 10, 11;

Red color (0-255) occupies more space as compared to Green (0-255). Red color with dimension 500 * 100 occupies 13.48528 % extra space, with dimension 1000 * 1000 occupies 9.02179% extra space, with dimaension500 * 500 occupies 13.27507% extra space, with dimension 2 *2 occupies 0.813008% extra space and same size on dimension 1 * 1.

Red color (0-255) occupies more space as compared to blue (0-255). Red color with dimension 500 * 1000 occupies 13.50638% extra space, with dimension 1000 * 1000 occupies 9.03385% extra space, with dimension 500 * 500 occupies 13.29588% extra space, with dimension 2 * 2 occupies 0.813008% extra space and same size on dimension 1 * 1.

Green color (0-255) occupies more space as compared to blue (0-255). Green color with dimension 500 * 1000 occupies 0.0243932% extra space, with dimension 1000 * 1000 occupies 0.01326612% extra space, with dimension 500 * 500 occupies 0.0239923% extra space and same size on dimension 2 * 2 and 1 * 1.

Red color (0-255) occupies more space as compared to black (0-0-0).  Red color with dimension 500 * 1000 occupies 29.5663% extra space, with dimension 1000 * 1000 occupies 20.2462 extra space, with dimension 500 * 500 occupies 8.40616% extra space, with dimension 2 * 2 occupies 4.06504% more extra space and same size on dimension 1 * 1.

Green color (0-255) occupies more space as compared to black (0-0-0).  Green color with dimension 500 * 1000 occupies 24.68594% extra space, with dimension 1000 * 1000 occupies 12.3375% extra space, with dimension 500 * 500 occupies 18.37812% extra space, with dimension 2 * 2 occupies 3.27869% more extra space and same size on dimension 1 * 1.

Blue color (0-255) occupies more space as compared to black (0-0-0). Blue color with dimension 500 * 1000 occupies 18.56777% extra space, with dimension 1000 * 1000 occupies 12.3375% extra space, with dimension 500 * 500 occupies 18.35853% extra space, with dimension 2 * 2 occupies 3.27869% more extra space and same size on dimension 1 * 1.

ID Difference Between Difference Of Size in % Less Preferred More preferred Dimension
1 Red,  Green 13.48528 Red Green 500*1000
2 Red,  Green 9.02179 Red Green 10000*1000
3 Red,  Green 13.27507 Red Green 500*500
4 Red,  Green 0.813008 Red Green 2*2
5 Red,  Green 0.00 Null Null 1*1
6 Red,  Blue 13.50638 Red Blue 500*1000
7 Red,  Blue 9.03385 Red Blue 1000*1000
8 Red,  Blue 13.29588 Green Blue 500*500
9 Red,  Blue 0.813008 Green Blue 2*2
10 Red,  Blue 0.00 Null Null 1*1
11 Green,  Blue 0.0243932 Green Blue 500*1000
12 Green,  Blue 0.01326612 Green Blue 1000*1000
13 Green,  Blue 0.0239923 Green Blue 500*500
14 Green,  Blue 0.00 Null Null 2*2
15 Green,  Blue 0.00 Null Null 1*1
16 Black,  Blue 18.56777 Blue Black 500 * 1000
17 Black,  Blue 12.3375 Blue Black 1000 * 1000
18 Black,  Blue 18.35853 Blue Black 500 * 500
19 Black,  Blue 3.27869 Blue Black 2 * 2
20 Black,  Blue 0.00 Null Null 1*1
21 Black, Green 24.68594 Green Black 500 * 1000
22 Black, Green 12.3375 Green Black 1000 * 1000
23 Black, Green 18.37812 Green Black 500 * 500
24 Black, Green 3.27869 Green Black 2 * 2
25 Black, Green 0.00 Null Null 1*1
26 Black, Red 29.5663 Red Black 500 * 1000
27 Black, Red 20.2462 Red Black 1000 * 1000
28 Black, Red 8.40616 Red Black 5000 * 500
29 Black, Red 4.06504 Red Black 2 * 2
30 Black, Red 0.00 Null Null 1 * 1

Table 10: Illustration of difference between single color with single colo

During the experiments with two colored (0-255, 0-255) PNG images, we get the following results as illustrated in Figure 2-7 and in Table 10,11;

Red with Green color (1-255, 1-255) occupies more space as compared to Red with Blue (1-255, 1-255). Red with Green color with dimension 500 * 100 occupies 8.20848 % extra space, with dimension 1000 * 1000 occupies 5.62394% extra space, with dimension 500 * 500 occupies 8.05243% extra space, with dimension 2 *2 and 1 * 1 occupies same space.

Green with Red color (1-255, 1-255) occupies more space as compared to Green with Blue color (1-255, 1-255). Green with Red color with dimension 500 * 100 occupies 13.48386% extra space, with dimension 1000 * 1000 occupies 9.02124% extra space, with dimension 500 * 500 occupies 13.25427% extra space, with dimension 2 *2 occupies 0.813008% extra space and occupies same space on dimension 1 * 1.

Blue with Red color (1-255, 1-255) occupies more space as compared to Blue with Green color (1-255, 1-255). Blue with Red color with dimension 500 * 100 occupies 5.74713% extra space, with dimension 1000 * 1000 occupies 3.599744% extra space, with dimension 500 * 500 occupies 5.65739%extra space, with dimension 2 *2 occupies 0.813008% extra space and occupies same space on dimension 1 * 1.

ID Difference Between Difference Of Size in % Less Preferred More preferred Dimension
1 Red + Green,  Red + Blue 8.20848 Red +Green Red + Blue 500*1000
2 Red + Green,  Red + Blue 5.62394 Red +Green Red + Blue 10000*1000
3 Red + Green,  Red + Blue 8.05243 Red +Green Red + Blue 500*500
4 Red + Green,  Red + Blue 0.00 Null Null 2*2
5 Red + Green,  Red + Blue 0.00 Null Null 1*1
6 Green + Blue ,  Green + Red 13.48386 Green + Red Green + Blue 500*1000
7 Green + Blue ,  Green + Red 9.02124 Green + Red Green + Blue 1000*1000
8 Green + Blue ,  Green + Red 13.25427 Green + Red Green + Blue 500*500
9 Green + Blue ,  Green + Red 0.813008 Green + Red Green + Blue 2*2
10 Green + Blue ,  Green + Red 0.00 Null Null 1*1
11 Blue + Green ,  Blue + Red 5.74713 Blue + Red Blue + Green 500*1000
12 Blue + Green ,  Blue + Red 3.599744 Blue + Red Blue + Green 1000*1000
13 Blue + Green ,  Blue + Red 5.65739 Blue + Red Blue + Green 500*500
14 Blue + Green ,  Blue + Red 0.813008 Blue + Red Blue + Green 2*2
15 Blue + Green ,  Blue + Red 0.00 Null Null 1*1

Table 11: Illustration of difference between two colors ( 1-255, 1-255) with two color.

During the experiments with single color (0-255) JPG images, we get the following results as illustrated in Figure 8-12;

Red color with value 1-255 have different size

Green color with value 1-255 have different size

Blue color with value 1-255 have different size

Red, Green and Blue color have the same size.

CONCLUSIONS

Image size is a challenging problem especially for web and when we want to have big data. Different techniques are available to optimize the image. Our proposed research shows different behavior of different colors. We conclude that most colors have different size. Color is a factor that can affect the image size. In PNG images Blue have less size as compared to Green. Green has less size as compared to Red. Similarly Red with Blue has less size as compared to Red with Green. Green with Blue has less size as compared to Green with Red. Blue with Green has less size as compared to Blue with Red.

In PNG images, different colors have the same size.eg; Red, Green, and Blue have the same size but one color with values 1-255 have different size. e.g.; Red color with values 1-255 has different size against each value.

References

[1] Mohiy.M.Hadhoud, Noura.A.Semary, Alaa.M.Abbas, “Fully Automated Black and White Movies Colorization System”, 2012

[2]  GONG Chao, Human-Machine Interface: Design Principles of Visual Information in Human Machine Interface Design, 2010.

[3]  Guobei Xiao, Guotong Xu and Jianwei Lu,“iBrowse: Software for Low Vision to Access Internet”, 2011.

[4]  Wang Zhengxia, Xiao Laisheng, “Design On The Scheme Of An Integrated Website For Art Training”, 2009.

[5]  Behzad  sajid, Adit Mjumder, Manulm, Oliveira, Rosa Lia, G. Schneider and Ramesh Raskar “Using patterns to encode color information for dichromats” , 2011.

[6]  R. Agarwal, V. Venkatesh, Assessing a firm’s Web presence: a heuristic evaluation procedure for the measurement of usability, Information Systems Research(2002).

[7]  R. Benbunan-Fitch, Methods for evaluating the usability of web based systems, Proceedings of the AIS, Aug. 1999.

[8]  R. Benbunan-Fitch, Using protocol analysis to evaluate the usability of a commercial web site, Information & Management, 2001.

[9]  J. Carroll, The minimal manual, Human–Computer Interaction 3(1988) 123–153. X. Fang, C.W. Holsapple / Decision Support Systems, 2007.

AUTHORS

Fazal Rehman (Shamil) is working as a professor in University Of Shamil, Pakistan. My research is focused on web engineering, E-commerce and software modeling.

Fazal Rehman Shamil
Welcome to all friends. The reason for our success is only your love for T4Tutorials. Our team is always available to answer your queries regarding any kind of confusions or discussion regarding your study and career matters. For discussion with us please join our facebook group "T4Tutorials.com". The link of the group is mentioned below. Thanks and love to all for connecting with us. We are nothing without you. Love you all.....
https://web.facebook.com/groups/2066136233601097/

Leave a Reply