Skip to content

czycha/destroy.jpeg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

destroy.jpeg

Use JPEG to corrupt an image beyond recognition. Works through opening and saving an image with different quality values.

Requires

destroyJPEG

destroyJPEG(minCompression, maxCompression, pathToFile, timesToIterate)
  • minCompression - The lower quality value. The least possible value is 1.
  • maxCompression - The higher quality value. The greatest possible value is 95.
  • pathToFile - Path to image file.
  • timesToIterate - Can be a single integer, or a list of integers. Saves image this many times (the more times, the least recognizable). If it is a list of integers, it will save a duplicate at each time in the list.

Example

destroyJPEG(1, 95, 'image.png', 20)

Saves an image called image.d.jpg.

destroyJPEG(1, 95, 'image.png', [20, 40, 60])

Saves images image.d.jpg, image.d20.png, image.d40.png, and image.d60.png (image.d.jpg and image.d60.png are graphically equivalent).

Command line

python destroyjpeg.py 1 95 image.png 20
python destroyjpeg.py 1 95 image.png 20 40 60

About

Use JPEG to corrupt an image beyond recognition.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages