-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(FEATURE SUGGESTION) Disable interlacing if the optimization is inefficient. #667
Comments
When you say for some images interlacing doesn't increase the file size, do you mean vs the original file or vs optimising without interlacing? |
@andrews05 This might be another (less-priority) choice to throw into #523, given enough idle cores? |
Vs the original of course. I understand the drawbacks of interlacing but the main benefit of it is just too good for my case. |
Right, I'm just trying to understand the use case for what you're proposing. If you need interlacing on, then |
A webcomic. If the reader has slow connection - it would be a torture to wait until the page loads from top to bottom. Being able to see the scene at least on SOME pages before the entire file is loaded would be cool. |
Hm, wouldn’t that be oddly inconsistent? Why not turn it on for all images? |
It would be convenient where it is effective. There are still people with limited internet traffic (like me). If it can be displayed instantly with interlacing and with the reduced size - then let's go for it. If it can't - let's just go for reduced file size. |
@seacat17 Not to be completely devil's advocate, but why not use WebP as your (current) primary format? |
It doesn't have interlacing at all 🥹 I really wish JPEG XL wasn't getting purged from the web, I love it but it's incompatible. |
@seacat17 A more modern format would obviate the need for hacky interlaced/progressive decoding by having the actual full image quickly load. Right now, WebP & AVIF are the universal modern image formats, & for your use case, WebP is the obvious choice. Why waste time messing around w/ PNG hacking unless you've legacy requirements? Additionally, I've had great results for WebP @ 1% (!) quality, & amazing 1s @ 10%. I suggest putting time into that than burning 10× CPU cycles optimizing 0.1% bytes from PNG, just to add 10% back via interlacing, or 1st quantize to remove colors if you must have PNG for whatever reason.
We agree completely on this, hence the "Right now" proviso earlier. |
If my download speed is 10kb/s (that actually happens sometimes) - will WEBP help me? |
@seacat17 Yes, of course, especially as the WebP can be substantially smaller than PNG could be. If you combine via some ingenuity & have, e.g., low-quality WebP thumbnails (where size of WebP [thumbnail + full image] is still much smaller than best PNG size), you'll receive maximum benefits @ much more efficiency. |
Regardless of WebP, I'm still unsure of the merits of the proposed feature. I don't think comparison vs the original file size is beneficial - it could be bloated for any number of reasons, or be highly optimised beyond what oxipng can do anyway. |
So this feature isn't coming... Do you know any other interlaced image formats that work in the stable build of Firefox? |
Gif? 😂 |
@seacat17 If you don't mind lossy, progressive JPG @ certain quality settings is the other way to go. What's your website address to a worst/typical example? Now I'm curious what your actual conditions are. |
This isn't about the website. It's about the user's internet connection. |
@seacat17 No, I understand that. I want to simulate those conditions from your site & see if best solutions can be determined. |
http://archiesoniconline.com/?comic=sonic-the-hedgehog-online-251-cover |
@seacat17 That won't let me connect under any circumstance. Is there, e.g., a geo-restriction? It's not just me: https://downforeveryoneorjustme.com/archiesoniconline.com?proto=http |
W e i r d . . . I can connect easily. Try just http://archiesoniconline.com/ EDIT: Seems like a partial outage, I reported it. |
@seacat17 While waiting, are the images on GitHub, or do you have typical/worst examples I can work on? |
The feature isn't coming anyway. I think I'm gonna close it and sort everything manually. |
So basically I just closed an issue that had something to do with interlacing. In short: I did not have the "--force" flag that would... Ya know... Force the result to be recorded into the file even if it is bigger than the source, so the source material got recorded into the file instead, confusing me.
I have a weird feature suggestion. Basically, the interlacing does increase the file size for some images, but for some images - it really doesn't. It would be cool to optimize the image with interlacing first and then if it is ineffective - use default optimization and record it into the file instead of the unoptimized material.
This could be done with the (for example) "--interlace effective". In this case if I have a bunch of images in a folder - it would optimize them all and apply interlacing where it is effective only.
The text was updated successfully, but these errors were encountered: