-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Poor Image Optimization for Web/Mobile #3868
Comments
Do you know of a better image compressor than pngquant? That is the one used for the images in the docs right now. |
You are right, lossless compression is done for PNGs. but lossless compression is required for a small number of PNG images like this(the details should not be lost.); baked_light_comparison.png Images like transforms_euler_himself.png can be compressed with loss, the human eye cannot distinguish. Especially images with few colors and shapes can be highly compressed. 87KB (lossy compression)242KB (original)How much an image can be compressed depends on many factors, size, number of colors, number of frames. and compressing hundreds of them automatically with a script is not easy. Must be done while creating images/gifs. I use this ffmpeg shell method to convert video to high quality compressed gif. video2gif() {
if [[ "$1" == "-h" ]]
then
echo "usage: video2gif input.mov output.gif width FPS"
return 1
else
palette="/tmp/palette.png"
filters="fps=$4,scale=$3:-1:flags=bicubic"
ffmpeg -v warning -i $1 -vf "$filters,palettegen" -y $palette
ffmpeg -v warning -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $2
fi
}
|
I would recommend using looping videos instead of gifs altogether, you get both much higher visual fidelity and lower sizes with h264 encoding, and you have widespread support for the codec in browsers. @Calinou is using looping videos instead of gifs an option in the docs? |
@NathanLovato I haven't checked the state of using videos in Sphinx, but it should be feasible (even with an extension). Just make sure to use the |
Yes, there's also another attribute you need for iOS. I have had to look into that for our website some time ago. Good to know, let's keep that in mind. |
There are only a few gifs, the problem is not that gifs take up space. It is the use of unnecessary gif and zip files. And the images are not well compressed. IMO, I think documents and tutorial pages should be stored in separate github repositories and on separate web pages. |
@hazarek We already plan to remove ZIP files from this repository and store them in the godot-demo-projects repository instead. See this proposal for more information. |
Not enough. Manuals, API References, and Tutorials are different concepts. I am talking about developing these in separate branches. It should not be published on a single page. |
We're going to remove step-by-step tutorials from the docs and move towards focusing on a reference manual (with some practical examples). |
Your Godot version:
3.2
Issue description:
Poor image optimization for web.
All files over 100KB
I think it is possible to reduce these 179MB file to 50MB, with lossless (lossy lossless) compression.
Count: 216 file
Total size: 179MB
The text was updated successfully, but these errors were encountered: