Skip to content

Commit

Permalink
add demo site to qimg post
Browse files Browse the repository at this point in the history
  • Loading branch information
cesque committed May 8, 2024
1 parent 2302245 commit e0573cb
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions posts/qimg.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ export const meta = {
tags: ['design', 'programming'],
}

**qimg** is an image compression algorithm and filetype I created out of curiousity. A while back, I played around with the JPEG idea of dividing an image into equally-sized blocks and then performing some operation on those blocks to reduce the amount of data that needs to be stored. Achieving a high compression ratio was not a priority, and neither was accurately reproducing the source image from the compressed version.
**qimg** is an image compression algorithm and filetype I created out of curiousity. A [demo website](https://qimg-demo.vercel.app/) is available (designed for desktop only).

A while back, I played around with the JPEG idea of dividing an image into equally-sized blocks and then performing some operation on those blocks to reduce the amount of data that needs to be stored. Achieving a high compression ratio was not a priority, and neither was accurately reproducing the source image from the compressed version.

<Image src="https://cesque.com/storage/23/04/24/946994549187.jpg" full />

Expand Down Expand Up @@ -88,4 +90,9 @@ It would be really interesting to test the two strategies described above to see

My final idea for another iteration on this idea is a new algorithm working on the same basic principle of dividing the image up into boxes and iterating across them. The algorithm would generate a 2-colour gradient representing each box. The gradient would describe 2 colours, an angle and 2 stop positions to shift and scale the gradient correctly. No pixel data would be stored, so each box could be fully described using only 9 bytes.

I personally believe that this algorithm would produce terrible-looking results, but hopefully at least terrible-looking in an interesting way!
I personally believe that this algorithm would produce terrible-looking results, but hopefully at least terrible-looking in an interesting way!

---

### Update: demo site
**2024-05-09**: a few years later I'm thinking about this algorithm, as well as the gradient version mentioned above for which I have completed a proof-of-concept, when I find a half-finished implementation of a demo site written in React to load your own images and play around with different box sizes. I took a couple of hours to fix up and finish the site, and stuck it on Vercel. You can now play around with `qimg` on the demo site at [https://qimg-demo.vercel.app/](https://qimg-demo.vercel.app/).

0 comments on commit e0573cb

Please sign in to comment.