IMPACT OF JPEG-WEBP CONVERSION ON THE CHARACTERISTICS OF THE PHOTOGRAPHIC IMAGE

Original scientific paper JPG is the most common format in digital photography today. In 2010 Google introduced WebP as the new optimal format for presenting photographs in the web environment, and the conversion of JPEG to WebP in Gmail, Picasa and Chrome services from 2013 is automatic and no more optional. Changes in colours and drawing sharpness of the image that occur in the JPEG - WebP conversion are analysed in the paper. The results point out changes in colours and the drawing sharpness of the image which are the outcomes of the JPG - WebP conversion and which can affect the technical, semantic and syntactic features of the photographs.


Introduction
Digital photographic images can be recorded in different formats.Among those formats in the shooting area with the RAW file formats, JPEG (an acronym for Joint Photographic Experts Group) format established itself as the standard used which is also in other phases of the digital photographic systems as well as in the viewing photographs in a web environment [1].JPEG compression has emerged as the standard solution as it offers an efficient compression of image files.Although the method of compression loses specific details of recorded photographs, some changes remain invisible to the human eye and JPEG compression allows determination of the level of compression, or the quality control of the track [2].
In 2010 Google introduces new format designed for the pixel graphics, including photos, in the web environment, which is called WebP.The main objective of this format is to reduce the "weight" of images which are exchanged on the Web.The significance of this problem can be approximated by the fact that today 65 % of the content of websites make the image contents [3,4].
Although JPEG format is still a leading recording format for image information on the web, "weight" of JPEG files and non-existent support for interconnection (interlacing) and transparency make it unsuitable for absolute application in the web environment and it is primarily used for viewing photos, and PNG and GIF formats are used for transparent and intertwined graphics.
WebP should successfully resolve the above problems associated with visual and written formats used on the web with the ability to generate images with no loss of information (lossless) with the bit less "weight" output files compared to JPEG, GIF and PNG format.
From the photographic point of view, the introduction of WebP format for the realization of photographs in the web environment requires the conversion of JPEG files in WebP format and vice versa.In doing so, the photos in the JPEG format can be considered as the copyrighted original so during conversion any changes that affect the perception of photography, i.e. its syntactic and semantic value should not come out.This paper analyses the changes in colours and the drawing sharpness of the image that occur in the conversion of JPEG files in WebP format.

The theoretical part
JPEG format is the most common format in digital photography today.This format supports 16.777.216colours with maximum 65.535 × 65.535 pixels.The advantage of the JPEG format is also the possibility of adjusting the compression which manages the relation of the photo quality and the "weight" of the file.JPEG compression is therefore considered as optimal for the photographs of real scenes with the possibility of subtle variations and transitions of tones and colours while less suitable for line drawings, text graphics and multiple editing of digital images.[5] JPEG compression is performed in three phases.In the first phase, a discrete cosine transform (DCT) and the formation of 8 × 8 P blocks is carried out.At this stage there is no loss of image details.The second phase involves data reshuffling (quantization) which defines the size of the file, and thus the loss of image quality.In the third phase compression and encoding results are performed.
The basic characteristics of the JPEG files are as follows: compression with loss and the possibility of adjusting the ratio of quality and compression size, the ability to track the colour depth of 8 bits per channel, the ability of colour space and ICC profile definition and lack of support for transparency.Technical Gazette 23, 2(2016), 505-509 The desire to create an optimal format for presenting photos (and other image information) led to the development of the WebP format introduced by Google company in 2010.The issue of conversion in JPEG format to WebP and vice versa becomes especially topical since 2013 when Google introduced automatic conversion of images from JPEG -WebP in Gmail, Picasa and Chrome services [6].
WebP format preliminary successfully addresses the shortcomings associated with existing image file formats used in web environment (Table 1).The basic advantage of this format is its ability to generate images without loss of information with 26 % less "weight" output file in relation to PNG, while in mode with losses (lossy) can achieve 34 % less "weight" compared to JPEG with identical SSIM (structural similarity index) index [7].Also, WebP supports lossless transparency (ie.Alpha channel) with the addition of 22 % of bytes in relation to the original WebP file and transparency in lossy mode, wherein given three times lighter output file in relation to the PNG file.WebP format uses compression algorithm of the image information based on the method of predictive coding in which the pixels are grouped into blocks and the values of the neighbouring blocks are red to predict the value of the observed block, and then only the difference between the actual value and prediction is encoded.With this compression, realization of up to 40 % lighter output files is enabled while maintaining the quality of the display [3].

Experimental part
In the experimental part of the paper the impact of the conversion of JPEG files in the WebP format on colours and the effect of this conversion on the sharpness of the image, ie, the ability of the line separation is investigated.For the purposes of the carried out tests the conversion of JPEG file of standard X-Rite colour table (Fig. 1), ECI score of 378 fields with the aim of calculating the volume and gamut characteristics of associated reproductions (Fig. 2) and ISO 12233 chart (Fig. 3) in WebP record is carried out.
For the colours of the X-Rite colour table L, a and b values of WebP format were determined in Adobe Photoshop CC and total colour difference ΔE 00 compared with baseline JPEG files was calculated.Application ColorThink based on ECI form of 378 fields colour gamuts for JPEG and WebP format was determined, and with ISO 12233 chart line separation ability (horizontal and vertical) for JPEG compression, 300 dpi resolution quality 12 and the corresponding WebP format.Difference in colour ΔE 00 is calculated with the formula [8]: where , 25 For the purpose of this paper a converter that allows the conversion of digital photos from JPEG format to WebP format is created.The convertor was created as the web application that allows JPEG files upload using HTML forms where PHP manipulates the image according to given parameters and forms the output WebP file.Transferring files to the server is performed with classical POSTprocedure, followed by preparation for the conversion by loading the file into working memory, in editable image form, with function imagecreate from jpeg () which is part of the PHP GD library [9].New PHP function imagewebp () introduced in PHP 5.5.0 version [10] formats the selected image and stores it as a WebP file to a local folder on the server.In terms of conversion quality original settings of imagewebp () function were used (Fig. 4).

Tab. 2 shows the L, a and b colour values of X-Rite colour table stored in the JPEG format, converted into
WebP format and ΔE 00 colour differences.Tab. 4 shows the ability of the line separation for JPEG compression, resolution of 300 dpi, format quality 12 and the corresponding WebP format.
Throughout the experimental part of the paper through measurable parameters JPEG and WebP image formats were compared.The results suggest the influence of JPEG format conversion, as the original, in the WebP format using the converter which uses the default settings of imagewebp () function in the chromatic and achromatic colours and sharpness of drawing as the basic indicators of preserving the image information in the conversion.
From Fig. 5 and Tab. 3 is obvious that the conversion of JPEG files in WebP format practically fully retains colour gamut, i.e. colour gamut volume and that in this regard the conversion does not affect the characteristics of the image.However, if the overall colour differences expressed as ΔE 00 values (Tab.2) are observed, it is obvious that the conversion to a certain extent and differently, affects the standard primary colours of additive and subtractive synthesis of colour, standard colours of real photographic motifs and achromatic colours.
If the observed image recordings are treated as an open system, i.e., which is commonly used in photography, a direct comparison is not assumed, it is obvious that at all observed colours occur, at least, visually detectable small deviations (ΔE 00 between 0,2 and 1).In primary colours of additive and subtractive synthesis these changes are in these limits and it can be said, with the exception of magenta, that the conversion did not significantly influence these colours.The changes in magenta are more pronounced (2,5279) and, although in consideration within the open system, can be taken as acceptable (ΔE 00 between 1 and 3), the change of magenta must be emphasized as the visually observable.
When observing the standard colours of the real photographic motifs for all colours, except for the dark skin colour, with conversion visually noticeable small deviations occur (ΔE 00 between 0,2 and 1).However, in the observed conversion from JPEG to WebP format for dark skin colour the more distinct change occurred (2,2161).It is necessary to emphasize the different change for the light skin colour (0,6169), and the dark skin colour which highlights the issue of colour reproduction in portrait photography as one of the dominant motifs.It is also necessary to take into account that preliminary tests showed the significant impact of small changes in colorimetric values of skin colours in the semantic value and experience of portrait photography.[11,12] The same discussion applies considering the changes of achromatic colour with conversion of JPEG to WebP format, ie, the changes are different for certain achromatic colours and, except for white, for which is the visually distinct small change, to other achromatic colours more distinct changes that are within the bounds of acceptability occurred (ΔE 00 between 1 and 3), except for the neutral 65 for which the change is still within acceptable limits (ΔE 00 between 3 and 6).This indicates the impact of the conversion on the features and reproduction of black and white photographs.
In this study, it should be noted that the ultimate limit on eligibility changes colour (ΔE 00 ) in direct comparison to these three, as previous studies have shown to further changes colour comes in the realization of digital recording photos (primarily print).
Tab. 4 shows the variation of the line separation as an indicator of drawing sharpness by converting JPEG to WebP format with the resolution of 300 dpi and, for JPEG, maximum quality which can be considered as the standard for quality implementation of printing.JPEG compression, as the original, shows the ability of separation which approximately corresponds to the ability of the line separation of professional digital cameras and lenses (1500 -1600 LW / PH -Line Widhts / Picture Hight) that is to the maximum realistic print of achieved line separations of dominant printing techniques of digital photographs (1200 -1500 LW / PH, depending on the technique of printing).Conversion of the WebP format reduces capability of line separation, ie, reduces the sharpness of drawings on, approximately, a lower limit of the line separation ability of dominant printing techniques of digital photographs.

Conclusion
In 2010, Google presented WebP as the new format for the pixel graphics display, and thus the photography, which was adapted to the application in a web environment.[13,14] Compared with the JPEG format, WebP format provides less "weight" in the same file within the same SSIM index [13,15] over JPEG compression, colour depth of 8 bits per channel, with an additional alpha channel, i.e. transparency, and, in contrast to the JPEG format, the possibility of generating images with no loss of information.[13,14,15] As from the year 2013, Google introduced automatic conversion of JPEG files in WebP format in Gmail, Picasa and Chrome services [13], the question of retention of technical and, consequently, syntactic and semantic characteristics of the photographic image which is, as the original, with shooting and processing in digital photography system usually recorded in JPEG format as the dominant standard for digital formats for photographic images.
For conversion from JPEG format to WebP format and, especially when it is not an optional solution, it is expected that there is no change in the characteristics of the photographic image which measurably can be expressed through the analysis of changes in gamut and volume of achieved colour space, analysis of created colour spaces (ΔE 00 ) and analysis of line separation.
The carried out tests show that the conversion of JPEG files in WebP format results with unsignificant differences in gamut and gamut colour volume.However, when looking at changes in certain standard chromatic and achromatic colours noticeable are the differences that may affect the perception of photographs.In doing so, the chromatic colours in particular can highlight problems of skin colour changes which are different with conversion, depending on whether the light or dark skin colour is observed.The observed changes may, as shown in the previous study [11,12], significantly affect the perception of portrait photography i.e. the message that the image conveys.Colour differences in observed achromatic colours point to the additional problems of reproduction and perception of black and white photographs after the conversion from JPEG to WebP format.
It turned out that the conversion of JPEG files in WebP format leads to changes in the drawing sharpness of the image expressed as the reduction in the ability of line separation after completion of the conversion.In the case of the resolution of 300 dpi, with maximum quality of JPEG files, as standard for the photographs planned for the realization with printing, converting JPEG into WebP format leads to the decrease in drawing sharpness from those that approximately corresponds to the maximum drawing sharpness of the image of professional digital cameras and lenses to the dominant printing techniques of digital photography to, approximately, the lower limit of drawing sharpness of the dominant printing techniques.WebP format leads to the changes in the technical characteristics of photographs that can lead to changes in its syntactic and semantic values i.e. to different perception of realized photographic image.As in the web environment photographs are more often automatically converted into WebP format, in certain cases it is possible to implement certain adjustments, primarily related to the tones and colours, in order to reduce the impact of the conversion.This is especially important for portrait photography that can carry certain messages (e.g.commercial photography) or which must preserve maximum image iconicity (e.g. the biometric portrait) or at the photographs where it is important to keep a maximum of author's idea (e.g.Art photography).
The observed and analysed problems point to the need for further studies related to the conversion of JPEG files in WebP format and development of converters which, in some segments, can reduce the differences in the characteristics of photographic images that result from the conversion.

Figure 4
Figure 4Original source code converter that allows conversion of photographs from JPEG format in WebP format, derived using HTML mark-up language and PHP programming language

Figure 5
Figure 5 Graphic display of volume colour gamut for JPEG and WebP formats Fig. 5 shows the colour gamut of JPEG and WebP formats.Tab.4 shows the ability of the line separation for JPEG compression, resolution of 300 dpi, format quality 12 and the corresponding WebP format.

Table 1
Comparison of JPG and WebP formats

Table 2 L
, a and b colour values of X-Rite colour table stored in the JPEG format, converted into WebP format and ΔE00 colour differences Tab. 3 presents the colour gamut volumes of JPEG and WebP formats.

Table 3
Gamut size for individual format, expressed in CIE Lab CCU