Hypergraph Grammar-Based Model of Adaptive Bitmap Compression Grzegorz Soli´ nski 1 , Maciej Wo´ zniak 1(B ) , Jakub Ryzner 1 , Albert Mosia lek 1 , and Anna Paszy´ nska 2 1 Department of Computer Science, AGH University of Science and Technology, Krak´ow,Poland macwozni@agh.edu.pl 2 Faculty of Physics, Astronomy and Applied Computer Science, Jagiellonian University, Krak´ow, Poland anna.paszynska@uj.edu.pl Abstract. JPEG algorithm defines a sequence of steps (essential and optional) executed in order to compress an image. The first step is an optional conversion of the image color space from RBG (red-blue-green) to YCbCr (luminance and two chroma components). This step allows to discard part of chrominance information, a useful gain due to the fact, that the chrominance resolution of the human eye is much lower than the luminance resolution. In the next step, the image is divided into 8×8 blocks, called MCUs (Minimum Coded Units). In this paper we present a new adaptive bitmap compression algorithm, and we compare it to the state-of-the-art of JPEG algorithms. Our algorithm utilizes hyper- graph grammar model, partitioning the bitmap into a set of adaptively selected rectangles. Each rectangle approximates a bitmap using MCUs with the size selected according to the entire rectangular element. The hypergraph grammar model allows to describe the whole compression algorithm by a set of five productions. They are executed during the compression stage, and they partition the actual rectangles into smaller ones, until the required compression rate is obtained. We show that our method allows to compress bitmaps with large uniform areas in a better way than traditional JPEG algorithms do. Keywords: Hypergraph grammar · Bitmap compression · Adaptive projection-based interpolation 1 Introduction Although baseline JPEG is still the most commonly used compression algorithm, a number of algorithms have emerged as an evolution to JPEG. The most preva- lent one is JPEG2000 standard (ITU-T T.800 — ISO/IEC 15444-1), which intro- duces usage of the Discreet Wavelet Transform in place of the Discreet Cosine Transform used in traditional JPEG, as well as usage of a more sophisticated entropy encoding scheme [1]. The standard also introduces an interesting feature, c Springer Nature Switzerland AG 2020 V. V. Krzhizhanovskaya et al. (Eds.): ICCS 2020, LNCS 12139, pp. 118–131, 2020. https://doi.org/10.1007/978-3-030-50420-5_9