Different colors combinations effect on image size

Different colors combinations effect on image size

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
1Min0
2Min+1
3Nominal127
4Max-254
5Max255

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

  G
1Min0
2Min+1
3Nominal127
4Max-254
5Max255

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

  B
1Min0
2Min+1
3Nominal127
4Max-254
5Max255

 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 
 ColourMixtureDimension

1*1

Dimension

2*2

Dimension

500*500

Dimension

1000*1000

Dimension

500*1000

IDRGB      
1000No Colour1191183402132166675
2100R1191234806165719477
312700R1191234806165719477
425400R1191234806165719477
525500R1191234806165719477
6010G1191224168150768199
701270G1191224168150768199
802540G1191224168150768199
902550G1191224168150768199
10001B1191224167150748197
1100127B1191224167150748197
1200254B1191224167150748197
1300255B1191224167150748197
141271270R+G1191234806165729478
1612710R+G1191234806165729478
171272540R+G1191234806165729478
181272550R+G1191234806165729478
2011270R+G1191234806165729478
212541270R+G1191234806165729478
222551270R+G1191234806165729478
2412701R+B1191234419156408700
251270127R+B1191234419156408700
261270254R+B1191234419156408700
271270255R+B1191234419156408700
2910127R+B1191234419156408700
302540127R+B1191234419156408700
312550127R+B1191234419156408700
3301271G+B1191224169150778200
340127127G+B1191224169150778200
350127254G+B1191224169150778200
360127255G+B1191224169150778200
3801127G+B1191224169150778200
390254127G+B1191224169150778200
400255127G+B1191224169150778200
421271271R+G+B1191234419156408701
43127127127R+G+B1191234419156408701
44127127254R+G+B1191234419156408701
45127127255R+G+B1191234419156408701
471127127R+G+B1191234419156408701
48254127127R+G+B1191234419156408701
49255127127R+G+B1191234419156408701
511271127R+G+B1191234419156408701
52127254127R+G+B1191234419156408701
53127255127R+G+B1191234419156408701

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

 Size 
 ColourMixtureDimension

1*1

Dimension

2*2

Dimension

500*500

Dimension

1000*1000

Dimension

500*1000

IDRGB      
1100R6316314723165038691
212700R6346344726165068694
325400R6356354727165078695
425500R6356354727165078695
5010G6316314723165038691
601270G6346344726165068694
702540G6356354727165078695
802550G6356354727165078695
9001B6316314723165038691
100127B6346344726165068694
1100254B6356354727165078695
1200255B6356354727165078695
131271270R+G6356354727165078695
1412710R+G6346344726165068695
151272540R+G6346344727165068695
161272550R+G6356354727165078695
2711270R+G6346344726165068695
182541270R+G6356354727165078695
192551270R+G6356354727165078695
2012701R+B6346344726165068694
211270127R+B6356354727165078694
221270254R+B6356354727165078694
231270255R+B6356354727165078694
2410127R+B6346344726165068694
252540127R+B6346344727165068694
262550127R+B6346344727165068694
2701271G+B6346344726165068694
280127127G+B6346344726165068694
290127254G+B6356354727165078694
300127255G+B6356354726165078694
3101127G+B6346344726165068694
320254127G+B6346344726165068694
330255127G+B6346344727165068694
341271271R+G+B6336334725165058694
35127127127R+G+B6306304722165028694
36127127254R+G+B6336334725165058694
37127127255R+G+B6336334725165058694
381127127R+G+B6346344725165068694
39254127127R+G+B6346344722165068694
40255127127R+G+B6346344725165068694
411271127R+G+B6356354726165078694
42127254127R+G+B6356354725165078694
43127255127R+G+B6356354722165078694

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.

IDDifference BetweenDifference Of Size in %Less PreferredMore preferredDimension
1Red,  Green13.48528RedGreen500*1000
2Red,  Green9.02179RedGreen10000*1000
3Red,  Green13.27507RedGreen500*500
4Red,  Green0.813008RedGreen2*2
5Red,  Green0.00NullNull1*1
6Red,  Blue13.50638RedBlue500*1000
7Red,  Blue9.03385RedBlue1000*1000
8Red,  Blue13.29588GreenBlue500*500
9Red,  Blue0.813008GreenBlue2*2
10Red,  Blue0.00NullNull1*1
11Green,  Blue0.0243932GreenBlue500*1000
12Green,  Blue0.01326612GreenBlue1000*1000
13Green,  Blue0.0239923GreenBlue500*500
14Green,  Blue0.00NullNull2*2
15Green,  Blue0.00NullNull1*1
16Black,  Blue18.56777BlueBlack500 * 1000
17Black,  Blue12.3375BlueBlack1000 * 1000
18Black,  Blue18.35853BlueBlack500 * 500
19Black,  Blue3.27869BlueBlack2 * 2
20Black,  Blue0.00NullNull1*1
21Black, Green24.68594GreenBlack500 * 1000
22Black, Green12.3375GreenBlack1000 * 1000
23Black, Green18.37812GreenBlack500 * 500
24Black, Green3.27869GreenBlack2 * 2
25Black, Green0.00NullNull1*1
26Black, Red29.5663RedBlack500 * 1000
27Black, Red20.2462RedBlack1000 * 1000
28Black, Red8.40616RedBlack5000 * 500
29Black, Red4.06504RedBlack2 * 2
30Black, Red0.00NullNull1 * 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.

IDDifference BetweenDifference Of Size in %Less PreferredMore preferred Dimension
1Red + Green,  Red + Blue8.20848Red +GreenRed + Blue500*1000
2Red + Green,  Red + Blue5.62394Red +GreenRed + Blue10000*1000
3Red + Green,  Red + Blue8.05243Red +GreenRed + Blue500*500
4Red + Green,  Red + Blue0.00NullNull2*2
5Red + Green,  Red + Blue0.00NullNull1*1
6Green + Blue ,  Green + Red13.48386Green + RedGreen + Blue500*1000
7Green + Blue ,  Green + Red9.02124Green + RedGreen + Blue1000*1000
8Green + Blue ,  Green + Red13.25427Green + RedGreen + Blue500*500
9Green + Blue ,  Green + Red0.813008Green + RedGreen + Blue2*2
10Green + Blue ,  Green + Red0.00NullNull1*1
11Blue + Green ,  Blue + Red5.74713Blue + RedBlue + Green500*1000
12Blue + Green ,  Blue + Red3.599744Blue + RedBlue + Green1000*1000
13Blue + Green ,  Blue + Red5.65739Blue + RedBlue + Green500*500
14Blue + Green ,  Blue + Red0.813008Blue + RedBlue + Green2*2
15Blue + Green ,  Blue + Red0.00NullNull1*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.

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.....

Leave a Reply