# How can I duplicate this type of image?

I'm very new to the idea of signal processing, could someone point me in the direction of of a program to toy with images, below is a link to 2 taken a split second apart that showed up on my Amazon app. I've been making decimated images recently in Photoshop and want to play with images in a way that may have more effect like this

The second image is sort of pixelated but not totally decimated image of the first image, an almost plain book cover. It's a split second of the lower one of this pixelation then snaps into the regular image. How can I take original images and process them with different signals to this effect. Notice there's banding on the top and bottom so it's not just a simple rescaling in Photoshop which I'm very familiar with.

I just cropped the original gray image:

and converted it to JPEG using irfanview, settings to 15% (my first guess, good feeling isn't?):

You can see see the same yellowish shades on the right, due to heavy chroma quantization. Specifying that the image should remain grayscale gives you this:

That second image really just looks like a strongly compressed JPEG image, with the typical artefacts of chosing only the lower-frequency DCT coefficients for storage. Notice how these blocks seem to all be squares of ca 8x8 px size? The "storage unit" of JPEGs is 8x8 pixels, and these blocks get 2D discrete cosine transformed, after which the resulting 8x8 coefficients are stored with different "precision". In this case, it seems only the first of that $8\cdot8=64$ coefficients actually made it to the JPEG, hence, the 8x8 blocks are constant. Some blocks on the very top also show some oscillations with a ca 2px period in y-direction, so there's a second stored coefficient for those.

You should be able to produce a similar result by just saving your image to a JPEG file with very high compression/very low quality.

• Marcus thank you so much for the reply. This is a great. Are there simple programs to change an image in real time, the coefficients oscillations etc? – Michael Cappabianca Feb 9 '16 at 21:31
• sure, but I wouldn't know any of them. I'd take the time to write them if I were you; if you can program, using python or any other language and a library that gives you a DCT implementation would suffice. – Marcus Müller Feb 9 '16 at 21:48
• This is my problem I'm a photographer not a programmer. I'll post around and see...much thanks – Michael Cappabianca Feb 9 '16 at 21:56
• @MichaelCappabianca, your favourite graphics processing program will have adjustable JPEG compression levels, and usually even a preview for the effects of that; at least GIMP has. – Marcus Müller Feb 9 '16 at 21:56

Do I understand you right that you want to take the original ("good") image and degrade its quality so that it becomes this ("bad") blocky version?

If so, using a high JPG compression as suggested in other answers is a way to go. However, you would need an image processing library for that.

This might be an easier way:

• Your image is nothing else than a 2D array (ok, 3D if you count the color dimension. This does not complicate things, since you could do this calculation for each color channel and combine the three results at the end) for numbers.

• Choose a block size (e.g. 8 px as suggested in other answers)

• Chop up the image into patches of 8-by-8 pixels

• For each patch: Calculate the mean value of those numbers and set all the pixels in that patch to this mean value

You'll end up with something that looks very similar to your image without the need of a image processing library. You can do this just by two simple loops.