In recent years, technology has developed very dramatically in all fields, such as imaging technology, which has become crucial in most medical fields. Currently, widely medical images are used to diagnose and treat various illnesses. This research describes a novel waveform developed from the principle of torsion in Haar with Cosine and Sine waves (CAS) for compressing color and medical images such as Magnetic Resonance Imaging (MRI) and computed tomography (CT). This research proposes a method that discusses medical image decomposition and color images using novel waveform analysis for image compression, and how wavelet is utilized for image restoration. The experiments demonstrate that our method is more accurate and compressive than the Haar wavelet Transform (Haar) when comparing numerical results of Compressed file size, CR (Compression Ratio), PSNR (Peak Signal Noise Ratio) and RMSE (Root Mean Square Error). Furthermore, the method achieves better image quality.