Purpose The purpose of region-based medical image compression is to optimize the compression process by focusing on specific regions of interest within medical images. Unlike traditional compression methods that treat the entire image uniformly, region-based compression techniques identify and prioritize certain areas or regions within the image that are deemed more diagnostically significant or relevant. By allocating more resources to compressing these critical regions while reducing compression in less important areas, region-based compression methods aim to achieve higher compression efficiency while preserving diagnostic quality. This approach is particularly valuable in medical imaging, where accurate representation of anatomical structures or pathological findings is paramount for clinical diagnosis and decision-making. Region-based compression can help reduce storage requirements, transmission bandwidth, and processing time without compromising the diagnostic integrity of medical images, thereby facilitating more efficient healthcare delivery and telemedicine applications. Methods In this study, we utilized distortion-limiting compression techniques to optimize the compression process for specific regions within medical images. We employed lossless scalable RBC (Region-Based Compression) using Discrete Wavelet Transform (DWT) for Digital Imaging and Communication in Medicine (DICOM) images. The initial step involved medical image pre-processing, followed by segmentation to separate the image into regions of interest (ROI) and non-ROI. Compression techniques were then applied to reduce network bandwidth and storage requirements. Fractal lossy compression was employed for the non-ROI portion, while context-tree weighting lossless compression was proposed for the ROI portion, effectively compressing the image while rejecting noisy background elements. During decompression, the original medical image can be reconstructed using the reverse process. This approach optimizes storage and transmission efficiency while preserving diagnostic integrity in medical imaging applications. Results The experiment involved testing various medical images, and the proposed method outperformed previous techniques in terms of results. According to the findings, the improvement in Peak Signal-to-Noise Ratio (PSNR) over current techniques reached up to 24.23 dB compared to the Joint Photographic Experts Group (JPEG). Additionally, it achieved up to 12.22 dB improvement compared to other transform approaches. These significant enhancements prompted the development of a web and mobile platform for compressing and sending medical images, particularly microscopic ones, in real time. Conclusion This research focuses on employing wavelet transform techniques to compress the Region of Interest (ROI) within medical images. This ROI-based compression approach is particularly valuable as it retains essential diagnostic information while reducing the overall file size. Such a technique holds significant promise for telemedicine systems, especially in rural regions where network resources may be limited or constrained. By selectively compressing the most diagnostically relevant areas of medical images, this approach ensures that critical information is preserved while optimizing data transmission and storage efficiency. This can ultimately enhance access to medical imaging services and facilitate remote diagnosis and treatment in underserved areas with limited network infrastructure.