I'm working on generating JPEG DCT artifacts from a high-resolution random noise texture. Due to the large size of the original image (4243x6000 pixels), I'm providing a screenshot for reference. Below is a screenshot of the input image: enter image description here I aim to achieve an output similar to the following, maintaining the same resolution as the input:

enter image description here. The output image shown is a result of processing through a "deepfried" meme generator, which limits the width to 800 pixels. However, if I refrain from resizing the output, the artifacts are not added.

Could someone suggest a method, preferably using Python or Bash, PS, to generate the second image at the same resolution as the input while preserving the DCT artifacts?

  • 2
    Won't saving the image as a JPEG with low enough quality do what you want? Apr 2 at 16:42
  • @cybernetic.nomad thanks for the comment ! I tried but it looks like the artifacts only get generated if lowering the image size, the only solution that comes to my mind is to re-upscale the output to preserve them.
    – dciriello
    Apr 2 at 16:57
  • 2
    Probably you need to define the scale of the artifacts because the chunks a JPG produces are defined, and on a high-resolution image they will be tiny in comparison.
    – Rafael
    Apr 2 at 17:07
  • 1
    You may want to try saving as a JPEG, closing the file, reopening it, then saving as a JPEG again under a different name. This should increase the visibility of artifacts Apr 2 at 17:31
  • 2
    You can generate artifacts easily by exporting as JPEG and setting the quality to 0 in software such as GIMP, Photoshop, Krita, probably even ImageMagick. However, I feel the image you are showing has had more done to it, possibly a levels adjustment to intensify the contrast. I did this in GIMP. It's still the same resolution.
    – Billy Kerr
    Apr 2 at 18:13


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.