Skip to main content

Image compression using Python

Image compression is done to reduce the cost of storage and transmission Steps

  1. Open the file and read it
  2. Get the pixel values in RGB format
  3. Convert the tuples into one list
  4. Round the pixel values to nearest 10
  5. Regroup the pixel values into tuple of 3
  6. Create a new image from the tuple list where each pixel value in tuple indicate R,G,B value E.g. (42,34,67) indicates R=42,G=34,B=67
  7. Save the compressed image

Metadata

Release files for image-compression 0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for image-compression 0.4
File Size Uploaded
image-compression-0.4.tar.gz 1.9 kB Details

Release files / image-compression-0.4.tar.gz

Download URL image-compression-0.4.tar.gz
Size 1.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b512cb8925bc6282dc0f9fbd4eb809e70629f7a4152ebab0e7e22caf1050a6fd
BLAKE2b-256 checksum
How to use checksums
d0a53a70e582c336b8cf0fb1d79bf088d3774f82a9005fccd0ddac169e8bb3bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

Release history Release notifications | RSS feed

This release

0.4 This release

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page