Giter Club home page Giter Club logo

image-resizer's Introduction

Image Resize Library Test

I want to start evaluating the state of rust and its image processing libraries. I do not expect many libraries to be very feature rich but can presume that they should be able to resize a image quickly with a variety of sampling algorithms.

Purpose
Goal is to see if migrating our image resizing app using sharp image library. Sharp can perform the same conversion of a 2000x2000 to an 150x150 image size in 0.101s. If we can beat this metric we have a purpose to investigate migrating further.

Build

Test must be built as a release for speed optimizations.

cargo build --release
cargo install

Test

cd test
./benchmark-72ppi.

Benchmark : Resize Functions

Library Original Resized Sampling Function Elapsed
raster 2000x2000 150x150 Unknown resize 0.006
image 2000x2000 150x150 Unknown thumbnail 0.013
image 2000x2000 150x150 Lanczos3 resize 0.607
image 2000x2000 150x150 Gaussian resize 0.342
image 2000x2000 150x150 CatmullRom resize 0.138
image 2000x2000 150x150 Nearest resize 0.009
image 2000x2000 150x150 Triangle resize 0.070

Test performed with :

  MacBookPro11,5
  Processor Name:	Intel Core i7
  Processor Speed:	2.8 GHz
  Number of Processors:	1
  Total Number of Cores:	4
  L2 Cache (per Core):	256 KB
  L3 Cache:	6 MB
  Memory:	16 GB

Status

We have beaten sharp!!!

Need to check/verify quality output of images.

image-resizer's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.