Skip to content
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

Assets #399

Open
tansy opened this issue Apr 12, 2024 · 6 comments
Open

Assets #399

tansy opened this issue Apr 12, 2024 · 6 comments

Comments

@tansy
Copy link

tansy commented Apr 12, 2024

Noticed you use obscene number of graphics. Out of curiosity I tested if they can be optimised, and they do. This way shaved 2MB in size from it. You can find them here in directories, as they are in repo.

Although I, personally, think that having icons every 4 pixels or so, is overboard, I processed them all and encourage you to use.

@MouriNaruto
Copy link
Member

We should not compress images in Assets\OriginalAssets because it's original assets.

For packaging resources, I use pngquant to compress them.

Kenji Mouri

@tansy
Copy link
Author

tansy commented Apr 14, 2024

We should not compress images in
Assets\OriginalAssets because it's original assets.

I don't get what you mean by 'original'. They already are compressed - they are .pngs that are compressed, so what's the difference?
And, If you really want to leave them as 'original', then leave them this way, use the rest.

For packaging resources, I use pngquant to compress them.

Apparently it's not very efficient. I only optimized their compression with apngopt, and reduced their size by ~22%. If that's insignificant, then ok.

As I said, use it if you want, that's good, if not, it's also good.

@MouriNaruto
Copy link
Member

MouriNaruto commented Apr 14, 2024

I don't get what you mean by 'original'.

First, I should inform you that the PNG is a lossless bitmap image format.

The original PNG is originally generated from original SVG files via my generator as high quality as possible for better post-processing via other generators which converts the original assets to package assets. (So, Assets\OriginalAssets folder content will keep original. And it's not affect the package size because we use Assets\PackageAssets folder and Assets\PreviewPackageAssets folder for packaging.)

Apparently it's not very efficient.

I need to consider the ratio between quality and size. So I set the pngquant quality value to 80.

Kenji Mouri

@MouriNaruto
Copy link
Member

For comparison between mine and yours Assets\PackageAssets folder and Assets\PreviewPackageAssets folder.

Assets\PackageAssets folder

  • Mine: 927.896 Bytes
  • Yours: 925,101 Bytes

Assets\PreviewPackageAssets folder

  • Mine: 1,000,219 Bytes
  • Yours: 979,375 Bytes

Your assets will save 20,844 Bytes as a maximum when people use the extracted NanaZip Preview package. It seems less attractive.

Kenji Mouri

@MouriNaruto
Copy link
Member

MouriNaruto commented Apr 14, 2024

Oh, I forgot to say that the original assets are pixel-by-pixel tweaked via the icon designer for people see icons clearly. So, they're special ones.

Kenji Mouri

@tansy
Copy link
Author

tansy commented Apr 14, 2024

For comparison between mine and yours Assets\PackageAssets folder and Assets\PreviewPackageAssets folder.

Add you can guess I recompressed all 8MB of png images. I don't know which you do and which you don't use. It's not written anywhere, so I supposed they're all used.
So I, not anyone else, don't know, which of these 8MB are real resources and which are just 'original'.

First, I should inform you that the PNG is a lossless bitmap image

Guess I know that already.
I optimized deflate steam only, so they are, essentially the same.

As already said, you can use it or not. It's your choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants