HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
bvibber
mtpng
Rust2021–2021
bvibber / mtpng

mtpng

A parallelized PNG encoder in Rust

2Distinct people
2Mentions
0Explicit recommenders
229GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A parallelized PNG encoder in Rust

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by hour2 dated mentions

Observed mentions: 2021-08-29 17:25:37 UTC to 2021-08-29 19:25:51 UTC.

012021-08-29 17:00:00 UTC to 2021-08-29 18:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsAug 29, 17:002021-08-29 18:00:00 UTC to 2021-08-29 19:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsAug 29, 18:002021-08-29 19:00:00 UTC to 2021-08-29 20:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsAug 29, 19:00

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Aug 29, 17:002021-08-29 17:00:00 UTC2021-08-29 18:00:00 UTC101
Aug 29, 18:002021-08-29 18:00:00 UTC2021-08-29 19:00:00 UTC000
Aug 29, 19:002021-08-29 19:00:00 UTC2021-08-29 20:00:00 UTC101

What Hacker News says

2 sources
Are you required to use PNG or could you save the files in an alternative lossless format like TIFF [1]? If you're stuck with PNG, mtpng [2] mentioned earlier seems to be significantly faster with multithreading (>40% reduction in encoding times). If you're publishing for web, TIFF or cwebp might also be possibilities with -mt (multithreading) and -q 25 (lower compression and larger filesize but faster) flags, or an experimental GPU implementation [3]. [1] https://blender.stackexchange.com/questions/148231/what-imag... [2] https://github.com/brion/mtpng [3] https://emmaliu.info/15418-Final-Project/
In Ask HN: What problem are you close to solving and how can we help?
I have no experience in PNG encoding, but found https://github.com/brion/mtpng The author mentions "It takes about 1.25s to save a 7680×2160 desktop screenshot PNG on this machine; 0.75s on my faster laptop." which makes me think your slower performance on smaller images either comes using the max compression setting or using hardware with worse single threaded performance. Although these don't directly solve the PNG encoding performance problem, maybe some of these ideas could help? * if users will be using the app in an environment with plenty of bandwidth and you don't mind paying for server bandwidth, could you serve up PNGs with less compression? Max compression takes 15s and saves 35MB's. If the users have 50mbit internet, then it only takes 5.6s to transmit the extra 35MB, so you could come out 10s ahead by not compressing. (yes,
Read the rest
I see your comment about "don't say to use lower compression", but no reason to be killed by compression CPU cost if the bandwidth is available). * initially show the user a lossy image (could be a downsized png) that can be quickly generated. You could then upgrade to a full quality once you finish encoding the PNG, or if server bandwidth/CPU usage is an issue then you could only upgrade if the user clicks a "high-quality" button or something. If server CPU usage is an issue, the low then high quality approach could let you turn down the compression setting and save some CPU at the cost of bandwidth and user latency.
In Ask HN: What problem are you close to solving and how can we help?

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.