Comments (8)
I will see what I can do to speed it up. Could you do me a favour and contribute an app inside src/test/scala that when run, prints out benchmarking of compression levels 0 to 9 ?
from scrimage.
I see its not available on maven central, I'll just knock something up myself.
from scrimage.
I reckon its because we use PNG optimization. Going to add an option to disable it and may disable by default.
from scrimage.
For the bird image in src/test/resources (2000x1300),
Optimized (current default)
Compression level 0 took 1650ms
Compression level 1 took 2438ms
Compression level 2 took 2606ms
Compression level 3 took 3035ms
Compression level 4 took 3882ms
Compression level 5 took 4636ms
Compression level 6 took 6066ms
Compression level 7 took 7087ms
Compression level 8 took 9761ms
Compression level 9 took 12272ms
Unoptimized
Compression level 0 took 735ms
Compression level 1 took 706ms
Compression level 2 took 699ms
Compression level 3 took 690ms
Compression level 4 took 693ms
Compression level 5 took 690ms
Compression level 6 took 690ms
Compression level 7 took 691ms
Compression level 8 took 690ms
Compression level 9 took 686ms
from scrimage.
Hi, I see you did some benchmarks yourself... I don't quite get the optimized/unoptimized. I thought that was about compression. Sorry, kind of a newbie with this stuff.
The option of disabling by default seems good. Unsuspecting users would wonder why it's so slow otherwise.
from scrimage.
The PNGTastic library that we use applies more optimizations that just the
normal compression levels in Java's Image Writer.
Problem is the PNGTastic library only works on PNG files and not byte
arrays. So I have to write it out as a PNG first, before then optimizing
it. Not sure what the better solution is, because I the extra flag is bit
crap I agree.
On 7 January 2014 21:23, Sebastian Nozzi [email protected] wrote:
Hi, I see you did some benchmarks yourself... I don't quite get the
optimized/unoptimized. I thought that was about compression. Sorry,
kind of a newbie with this stuff.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/22#issuecomment-31780719
.
from scrimage.
I've updated the PNG support to use a newer library.
This gives me these results on your image:
Compression level 0 took 88ms
Compression level 1 took 69ms
Compression level 2 took 74ms
Compression level 3 took 91ms
Compression level 4 took 117ms
Compression level 5 took 159ms
Compression level 6 took 264ms
Compression level 7 took 345ms
Compression level 8 took 623ms
Compression level 9 took 905ms
The new implementation is here:
https://github.com/sksamuel/scrimage/blob/master/core/src/main/scala/com/sksamuel/scrimage/io/PngWriter.scala
Do you want to test it from master and if it tests out ok I'll do a release of 1.3.14 with this included?
from scrimage.
I've released 1.3.14 anyway as I want to start on 1.4. Will be on maven central soon. Can you let me know your findings.
from scrimage.
Related Issues (20)
- Unable to use composite on images HOT 1
- WebP & ImageOutputStream HOT 2
- on amazon linux ,error occur HOT 5
- WebP parsing is broken on latest version HOT 2
- Feature Request: Scala 3 support HOT 2
- PNG image compression ineffective HOT 1
- Some filters don't work for non ARGB images HOT 4
- StreamingGifWriter#withInfiniteLoop method doesn't work correctly HOT 3
- How to write text on image
- ARM (M1/M2) support for WEBP HOT 14
- average implementation is not correct HOT 2
- Security vulnerability in the webp library. HOT 1
- Typo in microsite HOT 1
- Unable to Read JPEG Files HOT 5
- WebP is supported on mac-arm64 without extra configurations
- WebpWriter multiThread always false? HOT 2
- Reset Stream after reading ImageMetadata HOT 4
- Consider vendoring com.github.zh79325:open-gif HOT 1
- strange error in some cases HOT 2
- Animated Webp reading support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scrimage.