Implementasi Algoritma Huffman Coding pada Sistem Kompresi Citra Digital Berbasis Web

Rizqy Supriyadi, Rendy Saputra, Fadil Abubakar, Rizki Dwi Hapijar, Raihan Putra Dwiantara, Kus Supriyanto, Muhamad Irfan, Luthfi Indriyani

Abstract


Abstract— The rapid development of digital technology has increased the need for efficient storage and transmission of digital images. Large image file sizes can affect storage efficiency and data transfer processes, making image compression techniques necessary to reduce file size without significantly decreasing visual quality. This research aims to implement a web-based digital image compression system using a combination of Discrete Cosine Transform (DCT), quantization, Run Length Encoding (RLE), and Huffman Coding methods. The system was developed using the Laravel framework with support from HTML, CSS, and JavaScript, while image processing was performed using the canvas element in the browser. The compression process consists of RGB splitting, 8×8 blocking, DCT transformation, quantization, zigzag scanning, RLE, and Huffman Coding. The system also provides a before-after slider feature and evaluation parameters including Compression Ratio, Mean Squared Error (MSE), and Peak Signal-to-Noise Ratio (PSNR). Based on testing results using several JPG/JPEG images, the system achieved compression ratio values ranging from 79% to 97% with PSNR values between 31 dB and 38 dB. These results indicate that the proposed methods are capable of significantly reducing image file size while maintaining good visual quality.


Keywords


Compression Ratio; Discrete Cosine Transform; Huffman Coding; Image Compression; PSNR

Full Text:

PDF

References


J. Panjaitan, “Bulletin of Information Technology (BIT) Implementasi Metode Advance Image Coding UntukImage Compresion Pada Citra Natural,” Bulletin of Information Technology (BIT), vol. 2, no. 1, pp. 13–19, 2021.

M. Hafidh and A. Solichin, “Implementasi Kompresi Citra Dengan Metode Adaptive Huffman Coding Pada Sistem Penjualan Ardawalika Event Organizer,” Seminar Nasional Mahasiswa Fakultas Teknologi Informasi (SENAFTI) Jakarta-Indonesia, 2022, [Online]. Available: https://senafti.budiluhur.ac.id/index.php

H. Lubis, D. Budi Srisulistiowati, and A. Ilham Ramdhani, “HUFFMAN CODING PADA IMAGE COMPRESSION,” Science, and Technologies Journal, vol. 12, no. 1, 2022.

S. Hasan, S. Do Abdullah, A. Ambarita, and I. Amirudin, “Penerapan Algoritma Huffman Coding Dalam Menghemat Ruang Penyimpanan Data Multimedia File (Teks dan Gambar) Berbasis Python,” Jurnal Ilmiah ILKOMINFO - Ilmu Komputer & Informatika, vol. 7, pp. 2621–4962, Jul. 2024, doi: https://doi.org/10.47324/ilkominfo.v7i2.268.

X. Liu, P. An, Y. Chen, and X. Huang, “An improved lossless image compression algorithm based on Huffman coding,” Multimed. Tools Appl., no. 4, pp. 4781–4795, Jun. 2022, doi: 10.1007/s11042-021-11017-5.

P. D. Kulkarni and M. M. Dixit, “DCT and DWT Transform Methods in Adaptive Huffman Coding Systems: Variable Quantization Strategies for Improved Image Compression of HDR Images,” IAENG Int. J. Comput. Sci., vol. 52, no. 12, pp. 4865–4878, Dec. 2025.

I. G. A. G. D. Putri, I. M. O. Widyantara, N. P. Sastra, and D. M. Wiharta, “Kompresi Citra Medis dengan DWT dan Variable Length Code,” Majalah Ilmiah Teknologi Elektro, vol. 20, no. 2, p. 187, Dec. 2021, doi: 10.24843/mite.2021.v20i02.p02.

S.-E. Lee, S.-U. Cho, K. Chung, and H. Yoo, “RGB Channel Combinations Method for Feature Extraction in Image Analysis,” International Journal on Advanced Science, Engineering and Information Technology (IJASEIT), vol. 13, no. 3, Jun. 2023, doi: https://doi.org/10.18517/ijaseit.13.3.18388.

Y. Iqbal and O. J. Kwon, “Improved jpeg coding by filtering 8 × 8 dct blocks,” J. Imaging, vol. 7, no. 7, Jul. 2021, doi: https://doi.org/10.3390/jimaging7070117.

D. Nayak, K. Ray, T. Kar, and C. Kwan, “Walsh–Hadamard Kernel Feature-Based Image Compression Using DCT with Bi-Level Quantization,” MDPI – Computers, vol. 11, no. 7, Jul. 2022, doi: https://doi.org/10.3390/computers11070110.

C. F. Riman and P. E. Abi-Char, “Using DCT and Quadtree for Image Compression,” International Journal of Computing and Digital Systems, vol. 17, no. 1, 2025, doi: http://dx.doi.org/10.12785/ijcds/1571019981.

I. Q. Abduljaleel and A. H. Khaleel, “Significant medical image compression techniques: A review,” TELKOMNIKA Telecommunication, Computing, Electronics and Control, vol. 19, no. 5, pp. 1612–1621, Aug. 2021, doi: 10.12928/TELKOMNIKA.v19i5.18767.

K. Siregar, “DIGITAL IMAGE COMPRESSION USING RUN LENGTH ENCODING METHOD,” BIOS: Jurnal Informatika dan Sains, vol. 1, 2023.

M. Al Qerom, M. Otair, F. Meziane, S. AbdulRahman, and M. Alzubi, “LICA-CS: Efficient Lossless Image Compression Algorithm via Column Subtraction Model,” Journal of Robotics and Control (JRC), vol. 5, no. 5, pp. 1311–1321, 2024, doi: 10.18196/jrc.v5i5.21834.

Sindhu and Rohitha, “A NOVEL IMAGE COMPRESSION METHOD BASED ON ENERGY COMPACTION FOR RECONSTRUCTION OF IMAGE,” Journal of Tianjin University Science and Technology, vol. 55, no. 5, pp. 524–531, May 2022, doi: 10.17605/OSF.IO/V5YQS.

V. I. Ungureanu, P. Negirla, and A. Korodi, “Image-Compression Techniques: Classical and ‘Region-of-Interest-Based’ Approaches Presented in Recent Papers,” Multidisciplinary Digital Publishing Institute (MDPI) - Sensors, vol. 24, no. 3, Jan. 2024, doi: 10.3390/s24030791.

S. Li, J. Lu, Y. Hu, L. S. Mattos, and Z. Li, “Towards scalable medical image compression using hybrid model analysis,” J. Big Data, vol. 12, no. 45, pp. 1–31, Feb. 2025, doi: 10.1186/s40537-025-01073-1.




DOI: https://doi.org/10.26877/jiu.v12i1.27618

Refbacks

  • There are currently no refbacks.


Copyright (c) 2026 Rizqy Supriyadi

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.