Faiz Akhtar Aqila
Universitas Malikussaleh

Published : 1 Documents Claim Missing Document
Claim Missing Document
Check
Articles

Found 1 Documents
Search

Web-Based Binary Image Compression Using Thresholding and Run-Length Encoding Adli Rahman Harun Harahap; Fazila Nazifa Edilia; Andita Utami; Zianah Nafisah Simbolon; Faiz Akhtar Aqila
Journal of Information Technology and Computer System Vol. 2 No. 1 (2026): June
Publisher : CV. Multimedia Teknologi Kreatif

Show Abstract | Download Original | Original Source | Check in Google Scholar | DOI: 10.65230/jitcos.v2i1.116

Abstract

This study implements the Run-Length Encoding (RLE) algorithm for binary image compression in a web-based environment using thresholding as a preprocessing stage. The system was developed using JavaScript and the HTML5 Canvas API to perform grayscale conversion, thresholding, and image compression directly within a web browser. Thresholding was applied to transform RGB images into binary images with simpler and more repetitive pixel patterns suitable for RLE compression. The compression process encodes consecutive pixels with identical values into tuples consisting of run lengths and pixel values. Experiments were conducted using a test image and five threshold values (50,75,100,127,150) to evaluate their influence on compression performance. The results show that threshold selection affects pixel redundancy, the number of generated tuples, and compression efficiency. The highest performance was achieved at a threshold value of 127, resulting in storage savings of 63.6% and a compression ratio of 2.75:1. The findings indicate that RLE is effective for compressing binary images with repetitive pixel patterns. Furthermore, the RLE compression stage is lossless with respect to the binary image generated after thresholding, whereas the preprocessing stage from RGB to binary is lossy because color and intensity information are discarded.