jpeg Digital Image Processing python code


I am currently attending a Coursera course on Digital Image Processing and 2nd week’s assignment is the creation with Matlab of a jpeg process. I do not own Matlab so I try to do that in Python 3.10.

Code is for a GrayScale image and I destroyed the image on DCT->quantization and deQuantization ->iDCT in order to emulate partially what jpeg does (exercise does not include Huffman coding). I do not understand what I did wrong. I did not find any other forum about DIP so I turned to write for that matter here.

Is it possible to post the code and seek for assistance in this forum or will I be off topic too much?